Skip to content

Commit

Permalink
bugfix sphinx doc builder
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmaldonis committed Nov 1, 2019
1 parent 1427430 commit a9c8011
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a9c8011

Please sign in to comment.