pylint icon indicating copy to clipboard operation
pylint copied to clipboard

Feature request: Check use of deprecated exception classes like IOError

Open hannob opened this issue 5 years ago • 2 comments

#Is your feature request related to a problem? Please describe

Python reworked exception classes a while ago (starting version 3.3) and several error classes are now just aliases for OSError, see: https://www.python.org/dev/peps/pep-3151/#step-1-coalesce-exception-types

Describe the solution you'd like

pylint could warn about the use of deprecated error classes like IOError and propose that programmers use OSError instead.

hannob avatar Jun 10 '20 08:06 hannob

I see this is from 2022. Is help still wanted?

ronnzw avatar Oct 18 '24 09:10 ronnzw

Yes!

Probably needs to be added here: https://github.com/pylint-dev/pylint/blob/5feface0d48ba7a6a5eb2b7a2cac99f983afa6b8/pylint/checkers/stdlib.py#L309

DanielNoord avatar Oct 18 '24 11:10 DanielNoord