@staticmethod
decorator PYL-R0203317 # This is to be used only if this class is subclassed and the decorators
318 # needs to be used by the child.
319 check_page_number = staticmethod(check_page_number)
320 check_cache = staticmethod(check_cache)
316
317 # This is to be used only if this class is subclassed and the decorators
318 # needs to be used by the child.
319 check_page_number = staticmethod(check_page_number)320 check_cache = staticmethod(check_cache)
It is recommended to use the decorator syntax to declare a staticmethod. Read more about staticmethod here
class MyClass:
def smethod():
'''static method-to-be'''
# Convert smethod to `staticmethod`
smethod = staticmethod(smethod)
class MyClass:
@staticmethod
def smethod():
'''static method-to-be'''