@@ -502,7 +502,7 @@ class AccessorDocumenter(MethodDocumenter):
502
502
# lower than MethodDocumenter so this is not chosen for normal methods
503
503
priority = 0.6
504
504
505
- def format_signature (self ):
505
+ def format_signature (self ) -> str :
506
506
# this method gives an error/warning for the accessors, therefore
507
507
# overriding it (accessor has no arguments)
508
508
return ""
@@ -632,7 +632,7 @@ def get_items(self, names):
632
632
633
633
634
634
# based on numpy doc/source/conf.py
635
- def linkcode_resolve (domain , info ):
635
+ def linkcode_resolve (domain , info ) -> str | None :
636
636
"""
637
637
Determine the URL corresponding to Python object
638
638
"""
@@ -694,12 +694,12 @@ def linkcode_resolve(domain, info):
694
694
695
695
# remove the docstring of the flags attribute (inherited from numpy ndarray)
696
696
# 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 :
698
698
if what == "attribute" and name .endswith (".flags" ):
699
699
del lines [:]
700
700
701
701
702
- def process_class_docstrings (app , what , name , obj , options , lines ):
702
+ def process_class_docstrings (app , what , name , obj , options , lines ) -> None :
703
703
"""
704
704
For those classes for which we use ::
705
705
@@ -751,7 +751,7 @@ def process_class_docstrings(app, what, name, obj, options, lines):
751
751
]
752
752
753
753
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 :
755
755
"""
756
756
Starting with sphinx 3.4, the "autodoc-process-docstring" event also
757
757
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):
774
774
suppress_warnings .append ("ref.ref" )
775
775
776
776
777
- def rstjinja (app , docname , source ):
777
+ def rstjinja (app , docname , source ) -> None :
778
778
"""
779
779
Render our pages as a jinja template for fancy templating goodness.
780
780
"""
@@ -787,7 +787,7 @@ def rstjinja(app, docname, source):
787
787
source [0 ] = rendered
788
788
789
789
790
- def setup (app ):
790
+ def setup (app ) -> None :
791
791
app .connect ("source-read" , rstjinja )
792
792
app .connect ("autodoc-process-docstring" , remove_flags_docstring )
793
793
app .connect ("autodoc-process-docstring" , process_class_docstrings )
0 commit comments