missing-class-docstring / C0115ΒΆ
Message emitted:
Missing class docstring
Description:
Used when a class has no docstring. Even an empty class must have a docstring.
Problematic code:
class Person: # [missing-class-docstring]
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
Correct code:
class Person:
"""Class representing a person"""
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
Created by the basic checker.