False positive for try-except-raise
with multiple exceptions catching
#8051
Labels
False Positive 🦟
A message is emitted but nothing is wrong with the code
Good first issue
Friendly and approachable by new contributors
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Bug description
Error is produced when a single
except
statement catches several exceptions for re-raising and when these exceptions are not in the current namespace.Example (both
Exception1
andException2
here are inherited directly fromException
):Note that if I bring exceptions directly into namespace, then it works:
It also works if I use separate except statements for each:
Configuration
No response
Command used
Pylint output
************* Module check check.py:19:4: W0706: The except handler raises immediately (try-except-raise)
Expected behavior
No errors
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: