repeated-isinstance-calls (PLR1701)#
Derived from the Pylint linter.
Fix is always available.
What it does#
Checks for repeated isinstance
calls on the same object.
Why is this bad?#
Repeated isinstance
calls on the same object can be merged into a
single call.
Example#
Use instead:
Or, for Python 3.10 and later: