Skip to content

Commit

Permalink
Use comment style for autodoc class attributes instead of docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm authored and abravalheri committed Nov 29, 2021
1 parent d6df47a commit 9ae5f6f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pyscaffold/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ class Extension:
property to match the entrypoint name).
"""

#: When ``True`` PyScaffold will store the extension in the PyScaffold's section of
#: ``setup.cfg``. Useful for updates. Set to ``False`` if the extension should not
#: be re-invoked on updates.
persist = True
"""When ``True`` PyScaffold will store the extension in the PyScaffold's section of
``setup.cfg``. Useful for updates. Set to ``False`` if the extension should not be
re-invoked on updates.
"""

def __init__(self, name: Optional[str] = None):
self._name = name or underscore(self.__class__.__name__)
Expand Down Expand Up @@ -101,11 +100,11 @@ def activate(self, actions: List[Action]) -> List[Action]:
"""
raise NotImplementedError(f"Extension {self.name} has no actions registered")

#: Shortcut for :obj:`pyscaffold.actions.register`
register = staticmethod(register)
"""Shortcut for :obj:`pyscaffold.actions.register`"""

#: Shortcut for :obj:`pyscaffold.actions.unregister`
unregister = staticmethod(unregister)
"""Shortcut for :obj:`pyscaffold.actions.unregister`"""

def __call__(self, actions: List[Action]) -> List[Action]:
"""Just delegating to :obj:`self.activate`"""
Expand Down

0 comments on commit 9ae5f6f

Please sign in to comment.