Back to Intellij Community

PyMethodOverridingInspection

python/python-psi-impl/resources/inspectionDescriptions/PyMethodOverridingInspection.html

2025.3-rc-2385 B
Original Source

Reports inconsistencies in overriding method signatures.

Example:

class Book:
    def add_title(self):
        pass

class Novel(Book):
    def add_title(self, text):
        pass

Parameters of the add_title method in the Novel class do not match the method signature specified in the Book class. As a fix, the IDE offers to apply the Change Signature refactoring.