Python

Python

Made by DeepSource

Comparison with callable detected PYL-W0143

Bug risk
Major

A comparison with a callable has been detected, which suggests you may have forgotten to actually call the function or method. If you intended to check if both of these callables are the same, it's recommended to use the is operator for comparison. Otherwise, if you intended to compare against the value returned by this callable, please consider changing this to the actual function call.

Bad practice

some_callable == some_other_callable

Recommended

some_callable is some_other_callable  # using the `is` operator

# or

some_value == some_callable()