Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: merge docstrings #34

Open
wadetregaskis-linkedin opened this issue Jan 4, 2020 · 0 comments
Open

Feature request: merge docstrings #34

wadetregaskis-linkedin opened this issue Jan 4, 2020 · 0 comments

Comments

@wadetregaskis-linkedin
Copy link

It'd be great if there were a way for overridden methods to amend the parent docstring in some way - even if just through some kind of dumb string concatenation. Sometimes the overriding method has more useful information to add - e.g. subclass-specific details or behaviours - but having to copy-paste the entire parent docstring creates a maintenance burden, since now the docstrings must be carefully, manually kept synchronised.

Even better would be if common docstring formats were understood, and the merge done more intelligently than just a string concatenation - e.g. param / return values in the override get individually appended to the corresponding lines from the parent.

The exact behavour desired - re. append vs merge vs replace - could be controlled via an optional argument to @overrides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants