Skip to content

Commit

Permalink
tree: _level should be an instance invariable
Browse files Browse the repository at this point in the history
_level is initialized as a class variable
whereas it should be an instance variable
of DtshBuiltinTree.
  • Loading branch information
dottspina committed Apr 26, 2023
1 parent aa0a96b commit 2111257
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dtsh/builtin_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DtshBuiltinTree(DtshCommand):
"""

# Maximum display depth, 0 to follow all non disabled nodes.
_level: int = 0
_level: int

def __init__(self, shell: Dtsh):
super().__init__(
Expand All @@ -121,6 +121,7 @@ def __init__(self, shell: Dtsh):
]
)
self._dtsh = shell
self._level = 0

@property
def usage(self) -> str:
Expand Down

0 comments on commit 2111257

Please sign in to comment.