diff --git a/doc/conf.py b/doc/conf.py index 4aef3a61..b53b6d8c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -318,7 +318,7 @@ def __getattr__(cls, name): # JJM: Add custom documenter for properties so that the docs contain the return type annotation -from sphinx.ext.autodoc import DocstringSignatureMixin, ClassLevelDocumenter, inspect, Signature, isstaticmethod +from sphinx.ext.autodoc import DocstringSignatureMixin, ClassLevelDocumenter, inspect, Signature class PropertyDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: ignore """ Specialized Documenter subclass for python properties (with just an fget). @@ -354,7 +354,7 @@ def format_args(self): if inspect.isbuiltin(self.object) or inspect.ismethoddescriptor(self.object): # can never get arguments of a C function or method return None - if isstaticmethod(self.object, cls=self.parent, name=self.object_name): + if inspect.isstaticmethod(self.object, cls=self.parent, name=self.object_name): args = Signature(self.object, bound_method=False).format_args() else: args = Signature(self.object, bound_method=True).format_args()