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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

(馃悶) platform specified in inline configuration results in wacky behavior #12926

Open
KotlinIsland opened this issue Jun 2, 2022 · 0 comments
Labels
bug mypy got something wrong topic-configuration Configuration files and flags

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Jun 2, 2022

It seems like even though this is not a per module option, it is still being applied to the module, but it's using the global(linux) type defs.

import sys, winreg

if sys.platform == "win32":
    winreg.QueryValueEx

# Success: no issues found in 1 source file
# mypy: platform=win32
import sys, winreg

if sys.platform == "win32":
    winreg.QueryValueEx  # test.py:5:5: error: Module has no attribute "QueryValueEx"  [attr-defined]

playground

@KotlinIsland KotlinIsland added the bug mypy got something wrong label Jun 2, 2022
@KotlinIsland KotlinIsland changed the title (馃悶) platform specified in inline option results in wacky behavior (馃悶) platform specified in inline configuration results in wacky behavior Jun 2, 2022
@AlexWaygood AlexWaygood added the topic-configuration Configuration files and flags label Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-configuration Configuration files and flags
Projects
None yet
Development

No branches or pull requests

2 participants