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

pyanalyze does not do type narrowing at module level #743

Open
hauntsaninja opened this issue Mar 10, 2024 · 0 comments
Open

pyanalyze does not do type narrowing at module level #743

hauntsaninja opened this issue Mar 10, 2024 · 0 comments

Comments

@hauntsaninja
Copy link
Contributor

import os

if os.altsep is not None:
    print(os.altsep + "asdf")

gives:

Unsupported operands for addition: None and Literal['asdf'] (code: unsupported_operation)
In b.py at line 4
   1: import os
   2: 
   3: if os.altsep is not None:
   4:     print(os.altsep + "asdf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant