-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Make disallow-any-unimported flag invertible
#18030
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -963,6 +963,12 @@ from missing import Unchecked | |
|
|
||
| t: Unchecked = 12 # E: Type of variable becomes "Any" due to an unfollowed import | ||
|
|
||
| [case testAllowImplicitAnyVariableDefinition] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not fully sure how to test explicitly setting what is already the default behaviour. This test will pass whether or not This is a copy of the test immediately before it. The test before this sets |
||
| # flags: --ignore-missing-imports --allow-any-unimported | ||
| from missing import Unchecked | ||
|
|
||
| t: Unchecked = 12 | ||
|
|
||
| [case testDisallowImplicitAnyGeneric] | ||
| # flags: --ignore-missing-imports --disallow-any-unimported | ||
| from missing import Unchecked | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this down ~20 lines or so, as all invertible flags for this group were defined after non-invertible flags prior to now and I wanted to maintain that convention (assuming this was intentional and not just a coincidence)