@@ -502,7 +502,7 @@ class AccessorDocumenter(MethodDocumenter):
502502 # lower than MethodDocumenter so this is not chosen for normal methods
503503 priority = 0.6
504504
505- def format_signature (self ):
505+ def format_signature (self ) -> str :
506506 # this method gives an error/warning for the accessors, therefore
507507 # overriding it (accessor has no arguments)
508508 return ""
@@ -632,7 +632,7 @@ def get_items(self, names):
632632
633633
634634# based on numpy doc/source/conf.py
635- def linkcode_resolve (domain , info ):
635+ def linkcode_resolve (domain , info ) -> str | None :
636636 """
637637 Determine the URL corresponding to Python object
638638 """
@@ -694,12 +694,12 @@ def linkcode_resolve(domain, info):
694694
695695# remove the docstring of the flags attribute (inherited from numpy ndarray)
696696# because these give doc build errors (see GH issue 5331)
697- def remove_flags_docstring (app , what , name , obj , options , lines ):
697+ def remove_flags_docstring (app , what , name , obj , options , lines ) -> None :
698698 if what == "attribute" and name .endswith (".flags" ):
699699 del lines [:]
700700
701701
702- def process_class_docstrings (app , what , name , obj , options , lines ):
702+ def process_class_docstrings (app , what , name , obj , options , lines ) -> None :
703703 """
704704 For those classes for which we use ::
705705
@@ -751,7 +751,7 @@ def process_class_docstrings(app, what, name, obj, options, lines):
751751]
752752
753753
754- def process_business_alias_docstrings (app , what , name , obj , options , lines ):
754+ def process_business_alias_docstrings (app , what , name , obj , options , lines ) -> None :
755755 """
756756 Starting with sphinx 3.4, the "autodoc-process-docstring" event also
757757 gets called for alias classes. This results in numpydoc adding the
@@ -774,7 +774,7 @@ def process_business_alias_docstrings(app, what, name, obj, options, lines):
774774 suppress_warnings .append ("ref.ref" )
775775
776776
777- def rstjinja (app , docname , source ):
777+ def rstjinja (app , docname , source ) -> None :
778778 """
779779 Render our pages as a jinja template for fancy templating goodness.
780780 """
@@ -787,7 +787,7 @@ def rstjinja(app, docname, source):
787787 source [0 ] = rendered
788788
789789
790- def setup (app ):
790+ def setup (app ) -> None :
791791 app .connect ("source-read" , rstjinja )
792792 app .connect ("autodoc-process-docstring" , remove_flags_docstring )
793793 app .connect ("autodoc-process-docstring" , process_class_docstrings )
0 commit comments