-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Check expr that are implicitly true for lack dunder bool/len #10666
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 all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
1bc2b9d
wip
ikonst b3b301f
fix fixtures and tests
ikonst 76bd3e2
Undo unneeded test change
ikonst 801f274
Let’s try to just warn in boolean context (no tests yet)
ikonst cbcd9d9
disable for non-strict optional + message
ikonst c58bb6a
futile attempt to improve _format_expr_name
ikonst 6e497bb
kick CI
ikonst f0a5081
even more futile attempts on _format_expr_name
ikonst 12278df
add error code
ikonst bcf8706
docs
ikonst 050bd67
fix type_guard support
ikonst d2851a3
fix _format_expr_name sig
ikonst 6f0951d
revert change to testConditionalBoolLiteralUnionNarrowing
ikonst dc70b7c
handle FunctionLikes + re-add test
ikonst c68df2f
fix list fixture
ikonst f346448
fix typing
ikonst 903d72b
Merge remote-tracking branch 'origin/master' into check-always-true
ikonst d36a54c
fix type errors
ikonst b9dd548
fix TypeFixture
ikonst 212af09
fix sphinx syntax
ikonst 246d065
restructure _check_for_truthy_type
ikonst 9e19e85
Rewrite implicit_bool short description
ikonst 1753f2c
Remove unused _is_truthy_instance
ikonst e60082d
why did I ever change this code?
ikonst 250c19b
testImplicitBool: clean up newlines
ikonst 7166b54
Revert most of the changes to test fixtures
ikonst 9349eef
Merge remote-tracking branch 'origin/master' into check-always-true
ikonst d432220
confused but removing timedelta.__bool__
ikonst 6267456
Apply suggestions from code review
hauntsaninja 31977ab
Update test-data/unit/check-errorcodes.test
hauntsaninja 5c6d763
more copy changes
13af1eb
add a test
338e35b
Try to provide more color in the docs
ikonst 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
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
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
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
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
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
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.
nit: could be good to reduce the whitespace in this test