diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py index 3474f5f071..048a8a11de 100644 --- a/pywikibot/tools/djvu.py +++ b/pywikibot/tools/djvu.py @@ -87,6 +87,7 @@ def __str__(self) -> str: """Return a string representation.""" return str("{}('{}')").format(self.__class__.__name__, self._filename) + @staticmethod def check_cache(fn): """Decorator to check if cache shall be cleared.""" cache = ['_page_count', '_has_text', '_page_info'] @@ -100,6 +101,7 @@ def wrapper(obj, *args, **kwargs): return _res return wrapper + @staticmethod def check_page_number(fn): """Decorator to check if page number is valid. @@ -312,8 +314,3 @@ def delete_page(self, n): assert self.page_info(new_ref_page, force=True) == ('', (sz, dpi)) return True - - # This is to be used only if this class is subclassed and the decorators - # needs to be used by the child. - check_page_number = staticmethod(check_page_number) - check_cache = staticmethod(check_cache)