-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove pointless check_messages decorators
#6353
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 |
|---|---|---|
|
|
@@ -1294,7 +1294,6 @@ def _check_isinstance_args(self, node): | |
| self.add_message("isinstance-second-argument-not-valid-type", node=node) | ||
|
|
||
| # pylint: disable=too-many-branches,too-many-locals | ||
| @check_messages(*(list(MSGS.keys()))) | ||
| def visit_call(self, node: nodes.Call) -> None: | ||
| """Check that called functions/methods are inferred to callable objects, | ||
| and that passed arguments match the parameters in the inferred function. | ||
|
|
@@ -1831,11 +1830,19 @@ def _check_unsupported_alternative_union_syntax(self, node: nodes.BinOp) -> None | |
| self.add_message("unsupported-binary-operation", args=msg, node=node) | ||
| break | ||
|
|
||
| # pylint: disable-next=fixme | ||
| # TODO: This check was disabled (by adding the leading underscore) | ||
| # due to false positives several years ago - can we re-enable it? | ||
| # https://github.com/PyCQA/pylint/issues/6359 | ||
| @check_messages("unsupported-binary-operation") | ||
| def _visit_binop(self, node: nodes.BinOp) -> None: | ||
|
Collaborator
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. Do you understand why these are underscored? They don't seem to be called in this file..
Collaborator
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 saw that the functional test for this message (
Collaborator
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. Oh wow, we should probably follow up on that.. But then the decorator is "correct" we only need to de-underscore this function right? Perhaps we should keep the decorator and add a TODO to fix this?
Collaborator
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. You are right - if we plan to re-enable this check, the decorator should stay. Will fix this and add a TODO. |
||
| """Detect TypeErrors for binary arithmetic operands.""" | ||
| self._check_binop_errors(node) | ||
|
|
||
| # pylint: disable-next=fixme | ||
| # TODO: This check was disabled (by adding the leading underscore) | ||
| # due to false positives several years ago - can we re-enable it? | ||
| # https://github.com/PyCQA/pylint/issues/6359 | ||
| @check_messages("unsupported-binary-operation") | ||
| def _visit_augassign(self, node: nodes.AugAssign) -> None: | ||
| """Detect TypeErrors for augmented binary arithmetic operands.""" | ||
|
|
||
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.
😅