Repository navigation
Option to disallow all expressions of type Any(--disallow-any=expr) #3519
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
93d4c19
Implement --disallow-any=expr
ilinum 6517ae4
Add return types to functions
ilinum ee76320
Address code review feedback
ilinum f059dfd
The rest of the feedback (accidentally committed just one file)
ilinum ca06a5a
Update error message to be more precise when type contains `Any`
ilinum edef0b1
Remove redundant tests
ilinum b5c33d7
Disallow casts to `Any` (explicit or implicit)
ilinum a07ad12
Disallow calling functions that take parameters of type `Any`
ilinum ebc51a8
Add test for implicit casts with type comments
ilinum ff16858
Merge branch 'master' into disallow-any-expr
ilinum d6d9ecb
Add documentation
ilinum 775c5ec
Update error messages to be more clear
ilinum a8731e9
Do not report errors for calls to functions that accept Any
ilinum b0193fb
Remove unneeded always_allow_any = True
ilinum fd166b1
Update documentation to explain that calling untyped function is allowed
ilinum a2dbe35
Do not report errors in unchecked functions
ilinum 52b9206
Add test for basic functionality
ilinum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
Add test for basic functionality
- Loading branch information
commit 52b9206294769d65c0b3b524c0d5429c23911ba1
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It'd be nice to have some tests for the basic functionality. These tests do a good job of exercising the more interesting edge cases, but it's worth testing putting an
Anytype in a variety of expressions to make sure it's caught/the behavior is what we expect.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.
Done!
Let me know if you have any other test ideas.