4040__status__  =  "Production" 
4141
4242from  itertools  import  chain 
43+ from  typing  import  TYPE_CHECKING 
4344
4445from  sphinx .util  import  logging 
4546import  re 
5354from  sphinx .ext .autodoc  import  (
5455    ClassDocumenter , ModuleDocumenter , ALL , PycodeError ,
5556    ModuleAnalyzer , AttributeDocumenter , DataDocumenter , Options ,
56-     prepare_docstring )
57+     Documenter ,  prepare_docstring )
5758import  sphinx .ext .autodoc  as  ad 
5859
5960signature  =  Signature  =  None 
@@ -82,6 +83,12 @@ def force_decode(string: str, encoding: str) -> str:
8283__version__  =  _version .get_versions ()['version' ]
8384
8485
86+ if  TYPE_CHECKING :  # pragma: no cover 
87+     DOCUMENTER_MIXIN_BASE  =  Documenter 
88+ else :
89+     DOCUMENTER_MIXIN_BASE  =  object 
90+ 
91+ 
8592logger  =  logging .getLogger (__name__ )
8693
8794#: Options of the :class:`sphinx.ext.autodoc.ModuleDocumenter` that have an 
@@ -125,7 +132,7 @@ def _get_arg(param, pos, default, *args, **kwargs):
125132        return  default 
126133
127134
128- class  AutosummaryDocumenter (object ):
135+ class  AutosummaryDocumenter (DOCUMENTER_MIXIN_BASE ):
129136    """Abstract class for for extending Documenter methods 
130137
131138    This classed is used as a base class for Documenters in order to provide 
@@ -137,6 +144,8 @@ class AutosummaryDocumenter(object):
137144    #: Grouper functions 
138145    grouper_funcs  =  []
139146
147+     member_sections : dict 
148+ 
140149    def  __init__ (self ):
141150        raise  NotImplementedError 
142151
@@ -287,7 +296,6 @@ def get_grouped_documenters(self, all_members=False):
287296        else :
288297            return  documenters 
289298
290- 
291299    def  add_autosummary (self , relative_ref_paths = False ):
292300        """Add the autosammary table of this documenter. 
293301
0 commit comments