Skip to content

Commit

Permalink
[docs] Fix hook docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
elParaguayo committed Nov 10, 2023
1 parent 4395f1b commit f76bbf5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libqtile/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def _register(self, hook: Hook) -> None:
def _hook_func(func):
return self._subscribe(hook.name, func)

self.hooks[hook.name] = _hook_func if hook.func is None else hook.func(self)
hooked = _hook_func if hook.func is None else hook.func(self)
hooked.__doc__ = hook.doc

self.hooks[hook.name] = hooked


class Subscribe(HookHandlerCollection):
Expand Down

0 comments on commit f76bbf5

Please sign in to comment.