Skip to content
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

Problem in tracking variable definition in condition #8132

Closed
h8hawk opened this issue Dec 11, 2019 · 2 comments
Closed

Problem in tracking variable definition in condition #8132

h8hawk opened this issue Dec 11, 2019 · 2 comments
Labels
bug mypy got something wrong priority-1-normal

Comments

@h8hawk
Copy link

h8hawk commented Dec 11, 2019

mypy validate this code without any issue :

def foo(b: bool) -> int:
    if b: 
        a = 9
    return a
@msullivan
Copy link
Collaborator

mypy doesn't really track variable definedness, which is a known bug. I am certain that this must be filed already but I can't find it so I guess I'll triage this one for now!

@msullivan msullivan added bug mypy got something wrong priority-1-normal labels Dec 12, 2019
@hauntsaninja
Copy link
Collaborator

Duplicate of #2400

@hauntsaninja hauntsaninja marked this as a duplicate of #2400 Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-1-normal
Projects
None yet
Development

No branches or pull requests

3 participants