-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as not planned
Labels
False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeWon't fix/not planned
Milestone
Description
Bug description
no_self_use does not catch methods that have empty bodies (just a docstring or a pass
)
Configuration
No response
Command used
With the test cases from #6994 added:
pytest tests/test_functional.py::test_functional[no_self_use]
Pylint output
____________________________________________________ test_functional[no_self_use] ____________________________________________________
self = <pylint.testutils.lint_module_test.LintModuleTest object at 0x7f13d49a0910>
def runTest(self) -> None:
> self._runTest()
E AssertionError: Wrong results for file "no_self_use":
E
E Expected in testdata:
E 29: no-self-use
E 34: no-self-use
pylint/testutils/lint_module_test.py:145: AssertionError
Expected behavior
No errors.
Pylint version
pylint 2.15.0-dev0
astroid 2.11.6
Python 3.10.0 (default, Oct 8 2021, 12:02:33) [GCC 9.3.0]
OS / Environment
No response
Additional dependencies
Metadata
Metadata
Assignees
Labels
False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeWon't fix/not planned