-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Enhancement ✨Improvement to a componentImprovement to a componentGood first issueFriendly and approachable by new contributorsFriendly and approachable by new contributorsHelp wanted 🙏Outside help would be appreciated, good for new contributorsOutside help would be appreciated, good for new contributors
Description
https://github.com/PyCQA/pylint/blob/master/pylint/checkers/base.py#L2314 unidiomatic-typecheck
The error message is currently along the lines of:
Using type() instead of isinstance() for a typecheck. [unidiomatic-typecheck]
which is easy for users to misread as "use type instead of isinstance" which is the opposite of what we want and is what their code already does, leaving them wondering what they're not seeing. The sentence isn't obviously stating that what it describes is a problem and doesn't directly suggest the solution.
I suggest rewording this lint message short description to be prescriptive
Use isinstance() rather than type() comparisons for a typecheck.
(this wording exists up through at least pylint 2.6.0)
Metadata
Metadata
Assignees
Labels
Enhancement ✨Improvement to a componentImprovement to a componentGood first issueFriendly and approachable by new contributorsFriendly and approachable by new contributorsHelp wanted 🙏Outside help would be appreciated, good for new contributorsOutside help would be appreciated, good for new contributors