import-error
inconsistency between except ImportError
and with contextlib.suppress(ImportError)
#7270
Labels
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Milestone
Bug description
There's an inconsistency with
import-error
betweenexcept ImportError
andwith contextlib.suppress(ImportError)
.With the former Pylint doesn't complain when it can't find the module/package, but with the latter it does complain.
This can easily be reproduced with the following code:
Configuration
No response
Command used
Pylint output
Expected behavior
It's consistent.
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: