-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code
Milestone
Description
Bug description
class Foo:
@staticmethod
def func(string):
return string
a = func("bar")
On the last line, I get E1120: No value for argument 'string' in staticmethod call (no-value-for-parameter)
. I get the same error as if I remove the @staticmethod
decorator, and add a first argument self
to the definition of func
.
Configuration
No response
Command used
pylint test.py
Pylint output
************* Module test
test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
test.py:1:0: C0115: Missing class docstring (missing-class-docstring)
test.py:3:4: C0116: Missing function or method docstring (missing-function-docstring)
test.py:6:8: E1120: No value for argument 'string' in staticmethod call (no-value-for-parameter)
test.py:1:0: R0903: Too few public methods (1/2) (too-few-public-methods)
-----------------------------------
Your code has been rated at 0.00/10
### Expected behavior
I would expect the linter to not indicate that this is an error
### Pylint version
```shell
pylint 2.17.5
astroid 2.15.6
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
OS / Environment
Windows PowerShell in Windows Terminal on Windows 10
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code