Skip to content

Commit

Permalink
Sphinx needs getattr(.., default_value) to work on these
Browse files Browse the repository at this point in the history
  • Loading branch information
ramnes committed Nov 8, 2023
1 parent fdf8e25 commit 5795ce0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libqtile/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def __init__(self, registry_name: str, check_name=True):
self.registry_name = registry_name

def __getattr__(self, name: str) -> HookHandler:
if name not in self.hooks:
raise AttributeError
return self.hooks[name]

def _register(self, hook: Hook) -> None:
Expand Down

0 comments on commit 5795ce0

Please sign in to comment.