-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
More descriptive message for use-implicit-booleaness-not-comparison
#7725
More descriptive message for use-implicit-booleaness-not-comparison
#7725
Conversation
use-implicit-booleaness-not-comparison
use-implicit-booleaness-not-comparison
Pull Request Test Coverage Report for Build 3408761029
π - Coveralls |
a930e1f
to
3377f77
Compare
π€ Effect of this PR on checked open source code: π€ Effect on django:
The following messages are no longer emitted:
Effect on pandas:
The following messages are no longer emitted:
Effect on sentry:
The following messages are no longer emitted:
This comment was generated for commit 3377f77 |
Are you concerned about the first two Sentry primer messages @Pierre-Sassoulas or can we ignore/they are unrelated? |
It would be very surprising if no-member was affected by this change, I think it's unrelated. We probably need to set the commit we lint for each repo on the primer to avoid that. We chose not to at implementation but we're ignoring those messages now and there's never a time where we check the new false positive. If we have to update the commit in a merge request that would be the time when we check those new messages and we would not bother about it right now. |
collection_literal = { | ||
"list": "[]", | ||
"tuple": "()", | ||
"dict": "{}", | ||
}.get(description, "iterable") |
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 wonder would it be best to factor this logic out and into the _get_node_description
method? It is only used in this one place. Perhaps returning a tuple of description, collection_literal? You've looked into it more than I have so no problem if you disagree.
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.
You're right, it does not make a lot of sense right now but I'm going to use it use-implicit-booleaness-not-len later :) (there will also be list comprehension, dict comprension...)
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.
You are on π₯π₯ @Pierre-Sassoulas
Type of Changes
Description
Follow-up to #7723 in order to make #6870 more reviewable.