Reputation: 581
When I try to follow PEP8 and doc string a class that involves inheritance, PyCharm/PyCode Check for PEP8 always gives me a warning that the inherited parameters have no reference. Is it better to just delete these? Should I mention the params at all in the class that subclasses?
For example
class Parent:
"""Parent class
:param plugin: a plugin
:type plugin: plugin type
"""
def __init___(self,plugin):
self.plugin = plugin
class Child(Parent):
"""
:param plugin: the plugin from parent class
"""
Module 2 will give me a warning about plugin having no reference. Best practice for PEP8?
Upvotes: 1
Views: 3607
Reputation: 581
No canonical PEP8 answer for this, so closing. Standard practice is to not include or mention the doc string of parent in the child.
Upvotes: 2