Back to Intellij Community

PyArgumentEqualDefaultInspection

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

2025.3-rc-2253 B
Original Source

Reports a problem when an argument passed to the function is equal to the default parameter value.

This inspection is disabled by default to avoid performance degradation.

Example:

def my_function(a: int = 2):
    print(a)

my_function(2)