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

Remove identical docstrings in subclasses #262

Closed
Roel opened this issue Apr 18, 2020 · 0 comments · Fixed by #273
Closed

Remove identical docstrings in subclasses #262

Roel opened this issue Apr 18, 2020 · 0 comments · Fixed by #273
Assignees
Milestone

Comments

@Roel
Copy link
Member

Roel commented Apr 18, 2020

From the pyOpenSci review:

It seems the test classes are inheriting from a base class (AbstractTestTypes, AbstractTestSearch) and some methods' docstring are the same as the inherited method, using this approach is very hard to maintain and keep everything consistent. Also some methods could be an attribute, e.g.: def get_type(self): return Boring -> klass = Boring and it keeps your test classes more compact.

The pydov classes are also inheriting from base classes, and the docstrings work looks duplicated, if you don't add any docstring, the method will inherit from the base clases. If you think you need to have a customized docstring, maybe you can check some approaches for dynamic docstrings

I think it is sufficient to keep the docstrings in the base classes only, and only keep them in the subclass when they are different from those of the base class?

See also #263

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

Successfully merging a pull request may close this issue.

1 participant