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

stubtest does not validate incomplete features #17634

Closed
sobolevn opened this issue Aug 4, 2024 · 0 comments · Fixed by #17635
Closed

stubtest does not validate incomplete features #17634

sobolevn opened this issue Aug 4, 2024 · 0 comments · Fixed by #17635
Assignees
Labels
bug mypy got something wrong topic-configuration Configuration files and flags topic-stubtest

Comments

@sobolevn
Copy link
Member

sobolevn commented Aug 4, 2024

Similar to #17628 stubtest allows a configuration file with enable_incomplete_feature = setting.

But, it does not validate it, while main.py does that:

mypy/mypy/main.py

Lines 1340 to 1345 in fe4df12

# Validate incomplete features.
for feature in options.enable_incomplete_feature:
if feature not in INCOMPLETE_FEATURES | COMPLETE_FEATURES:
parser.error(f"Unknown incomplete feature: {feature}")
if feature in COMPLETE_FEATURES:
print(f"Warning: {feature} is already enabled by default")

So, right now you can specify wrong incomplete features or complete ones with no errors / warnings.

@sobolevn sobolevn added bug mypy got something wrong topic-stubtest topic-configuration Configuration files and flags labels Aug 4, 2024
@sobolevn sobolevn self-assigned this Aug 4, 2024
sobolevn added a commit that referenced this issue Aug 5, 2024
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 topic-stubtest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant