From f323fe31e7506f1002a8f97f16157d7977d30bb4 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:16:37 +0000 Subject: [PATCH] refactor: use `@staticmethod` decorator while defining the method It is recommended to use the decorator syntax to declare a staticmethod. Read more about staticmethod [here](https://docs.python.org/3/library/functions.html#staticmethod) --- python/demo_code.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/demo_code.py b/python/demo_code.py index 5e502b20..8639d8dc 100644 --- a/python/demo_code.py +++ b/python/demo_code.py @@ -21,11 +21,10 @@ def __init__(self): def get_number(self, min_max): raise NotImplemented + @staticmethod def smethod(): """static method-to-be""" - smethod = staticmethod(smethod) - def cmethod(cls, something): """class method-to-be"""