Open
Description
Bug description
I think that pylint should detect the case when type()
is used to compare two types, in which case IMHO isisntance()
should not be used:
if type(a) == type(b):
...
Configuration
Command used
pylint
Pylint output
C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
Expected behavior
No error triggered.
Pylint version
pylint 3.0.3
astroid 3.0.2
Python 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0]
OS / Environment
No response