Inspectopedia Help

Class has no `__init__` method

Reports cases in Python 2 when a class has no __init__ method, neither its parent classes.

Example:

class Book(): pass

The quick-fix adds the __init__ method:

class Book(): def __init__(self): pass

Inspection Details

Available in:

DataSpell 2023.3, PyCharm 2023.3

Plugin:

Python Community Edition, 233.SNAPSHOT

Last modified: 13 July 2023