Not reporting W0621 redefined-outer-name when the outer name is redefined by except .. as .. #4434
Labels
Enhancement ✨
Improvement to a component
False Negative 🦋
No message is emitted but something is wrong with the code
False Positive 🦟
A message is emitted but nothing is wrong with the code
Milestone
Steps to reproduce
Given a file
a.py
:Current behavior
Result of
pylint a.py
:Expected behavior
Expecting pylint reports
W0621 redefined-outer-name
on lineexcept IOError as CustomException
I tested overriding the outer name by
with .. as ..
, and the W0621 reported without problems.In my opinion, W0621 should also be reported when the outer name gets redefined by
except .. as ..
.pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: