-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E1101 false positive if exception variable reused with a different type #2802
Comments
Thanks! This explains why the issue was still there yesterday even with |
This was referenced Mar 8, 2019
This was referenced Apr 1, 2019
This was referenced Apr 10, 2019
This was referenced May 23, 2019
This was referenced Jun 1, 2019
This was referenced Jun 8, 2019
This was referenced Jun 11, 2019
This was referenced Jun 24, 2019
This was referenced Aug 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Sample code,
test.py
:then run:
Current behavior
exc
is used first withException
type, and then reused later on asOSError
(which haserrno
). pylint is confused and claimsexc
has noerrno
because it still thinks it's of typeException
:Expected behavior
pylint correctly identifies the type of the variable the second time it's used in an
except
block.pylint --version output
Bisect note: works with pylint 2.2.3, breaks with at least 2.3.0.
This relates to alidock/alidock#105.
The text was updated successfully, but these errors were encountered: