Skip to content

Commit

Permalink
refactor: add add_workspace to add child workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Feb 19, 2023
1 parent ee2b390 commit 07d592d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dooit/api/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def add_sibling(self, kind: str = WORKSPACE) -> "Workspace":
raise TypeError(f"Cannot add {kind} as a sibling")
return super().add_sibling(kind)

def add_workspace(self, index: int = 0):
return super().add_child(WORKSPACE, index)

def add_todo(self, index: int = 0) -> Todo:
return super().add_child(TODO, index)

Expand Down

0 comments on commit 07d592d

Please sign in to comment.