Skip to content

Commit

Permalink
tty: add visibility property to actions
Browse files Browse the repository at this point in the history
Let the caller know if the action is visible to the user or not.
  • Loading branch information
jkloetzke committed Jan 15, 2024
1 parent e20e250 commit 0007a93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pym/bob/tty.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def __init__(self, message, help=None):
###############################################################################

class BaseTUIAction:
visible = True

def __init__(self, showDetails):
self.showDetails = showDetails
Expand Down Expand Up @@ -136,6 +137,8 @@ def _isVisible(self, severity):
return (low <= self.__verbosity) and (self.__verbosity <= high)

class DummyTUIAction(BaseTUIAction):
visible = False

def __init__(self):
super().__init__(3)

Expand Down

0 comments on commit 0007a93

Please sign in to comment.