What's wrong
Hi! I mentioned, that code like this is being reported by rule WPS605:
class InviteLink:
...
@staticmethod
def generate_code():
return uuid.uuid4().hex.upper()
...
The doc says:
Methods without arguments are allowed to be defined, but almost impossible to use.
However, this approach is being possible to use. And it's not incorrect (I know there is WPS602 that forbids statismethod, but it's a separate rule).
How it should be
I suppose, there should not be an error.
Flake8 version and plugins
flake8 = "7.1.1"
wemake-python-styleguide = "1.0.0"
pip information
pip 24.0 from ... (python 3.12)
pip freeze is large and under NDA, sorry :(
OS information
Mac OS 15.2
What's wrong
Hi! I mentioned, that code like this is being reported by rule WPS605:
The doc says:
However, this approach is being possible to use. And it's not incorrect (I know there is WPS602 that forbids statismethod, but it's a separate rule).
How it should be
I suppose, there should not be an error.
Flake8 version and plugins
flake8 = "7.1.1"
wemake-python-styleguide = "1.0.0"
pip information
pip 24.0 from ... (python 3.12)
pip freeze is large and under NDA, sorry :(
OS information
Mac OS 15.2