Skip to content

Inherited Attribute Documentation

Show an ancestor attribute's docstring in Quick Documentation when a subclass overrides the attribute without adding local documentation. PyCharm renders direct attribute docstrings natively; BetterPy only fills the inherited override gap.

How to invoke

Place the caret on an overriding class attribute and open Quick Documentation with F1 / Ctrl+Q or the usual editor documentation action.

Example

class HttpUser:
    tasks = []
    """Collection of task classes that this user will run."""


class BooksAPI(HttpUser):
    tasks = [CrudFlow]

Quick Documentation for BooksAPI.tasks keeps PyCharm's native BooksAPI header and shows the documentation inherited from HttpUser.tasks.

Notes

  • A local attribute docstring always takes precedence and is rendered by PyCharm.
  • Example-bearing inherited docstrings are handed to the separate Docstring Example Rendering feature.
  • Existing Attribute Docstring in Quick Documentation preferences are migrated once to this feature.