-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Revert "A warning is now issued when assertions are made for None
"
#6234
Conversation
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 think it is a good feature in general, and should therefore get fixed / improved instead.
If being reverted there should be a test for the new behavior then at least.
But I think we should decide what to do in #4639 first.
@@ -543,7 +543,7 @@ def assert_result_warns(result, msg): | |||
|
|||
def test_tuple_warning(self, testdir): | |||
testdir.makepyfile( | |||
""" | |||
"""\ |
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.
Please do not change code unnecessary, especially when it is only to please your editor in some way (IIRC).
For all others this adds visual disbalance, and often gets highlighted in a special way (line continuation).
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.
?
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 think this is good to go as is, don't see why we would need a test for it. 👍
This can go to |
rebased on master! |
Oof another one bites the dust then (honestly it’s pretty satisfying seeing the revert being this smooth). Is it worth it to try and eliminate the false positive? Maybe try and only warn if it fails the test? (Some kinda |
@Tadaboody I don't think so, most cases the test will at least fail with a message anyway, as @asottile pointed out. @blueyed anything else here? |
I do not like the (unnecessary) code style change (and being ignored for pointing it out (across a rebase where it could have been fixed)), and will likely investigate in what I've said in #4639 (comment). |
Resolves #4639
CC @Tadaboody