Skip to content

Commit

Permalink
feat: top-level module components
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWii committed Apr 9, 2022
1 parent 9053464 commit 9d0557c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions integrity/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ def _runtime(self):
def _inject_command(self, cmd: str):
self._runtime.commands.append(self._mc.parse(cmd, using="command"))

def get_path(self, name: str):
def get_path(self, name: str = None):
current = self._runtime.get_path()
if not name:
return f"{current}/component"
return f"{current}/components/{name}"

def component(self, name: str):
def component(self, name: str = None):
return Component(self, name, self.get_path(name))


Expand Down

0 comments on commit 9d0557c

Please sign in to comment.