You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 functionor method docstring (missing-function-docstring)
test.py:6:8: E1120: No value forargument '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
The text was updated successfully, but these errors were encountered:
Bug description
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 argumentself
to the definition offunc
.Configuration
No response
Command used
Pylint output
OS / Environment
Windows PowerShell in Windows Terminal on Windows 10
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: