-
Notifications
You must be signed in to change notification settings - Fork 14
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
Cannot remove parameters #16
Comments
Hi mitar. Yes, the numpy docstring style does not try to parse individual arguments separately. It only works on a section-by-section basis. Thus if you want to use a different Pameters section in you child class' method than in the parent's docstring, you need to explicitly write that portion of the docstring. Alternatively you can write a custom docstring style that permits you to remove individual sections of an numpy docstring |
@mitar I may be able to find time to implement a per-parameter inheritance style. Would this be of significant use for you still? |
Yes. It is not a biggy, but it would make it cleaner. Thanks! |
@mitar any chance you could point me to your code where this is coming into play? I want to have a better idea of what a suitable solution might be. |
Here is an example. Inheriting from here. We are on purpose not adhering to Liskov substitution principle because we inspect at runtime. |
In my case I remove all arguments accepted in parent class in child's class method. It seems there is no way to also remove them from a docstring and it is automatically copied over? So I would like to remove the whole section. It seems I have to define an otherwise empty "Parameters" section.
(Working in numpy style.)
The text was updated successfully, but these errors were encountered: