@@ -78,14 +78,6 @@ def force_decode(string: str, encoding: str) -> str:
7878 return string
7979
8080
81- try :
82- from cyordereddict import OrderedDict
83- except ImportError :
84- try :
85- from collections import OrderedDict
86- except ImportError :
87- from ordereddict import OrderedDict
88-
8981from . import _version
9082__version__ = _version .get_versions ()['version' ]
9183
@@ -262,7 +254,7 @@ def get_grouped_documenters(self, all_members=False):
262254 except AttributeError : # sphinx<3.0
263255 pass
264256
265- documenters = OrderedDict ()
257+ documenters = {}
266258 for e in memberdocumenters :
267259 section = self .member_sections .get (
268260 e [0 ].member_order , 'Miscellaneous' )
@@ -350,13 +342,13 @@ class AutoSummModuleDocumenter(ModuleDocumenter, AutosummaryDocumenter):
350342 option_spec ['autosummary-' + _option ] = option_spec [_option ]
351343 del _option
352344
353- member_sections = OrderedDict ([
354- ( ad .ClassDocumenter .member_order , 'Classes' ) ,
355- ( ad .ExceptionDocumenter .member_order , 'Exceptions' ) ,
356- ( ad .FunctionDocumenter .member_order , 'Functions' ) ,
357- ( ad .DataDocumenter .member_order , 'Data' ) ,
358- ])
359- """:class:`~collections.OrderedDict ` that includes the autosummary sections
345+ member_sections = {
346+ ad .ClassDocumenter .member_order : 'Classes' ,
347+ ad .ExceptionDocumenter .member_order : 'Exceptions' ,
348+ ad .FunctionDocumenter .member_order : 'Functions' ,
349+ ad .DataDocumenter .member_order : 'Data' ,
350+ }
351+ """:class:`dict ` that includes the autosummary sections
360352
361353 This dictionary defines the sections for the autosummmary option. The
362354 values correspond to the :attr:`sphinx.ext.autodoc.Documenter.member_order`
@@ -400,12 +392,12 @@ class AutoSummClassDocumenter(ClassDocumenter, AutosummaryDocumenter):
400392 option_spec ['autosummary-' + _option ] = option_spec [_option ]
401393 del _option
402394
403- member_sections = OrderedDict ([
404- ( ad .ClassDocumenter .member_order , 'Classes' ) ,
405- ( ad .MethodDocumenter .member_order , 'Methods' ) ,
406- ( ad .AttributeDocumenter .member_order , 'Attributes' ) ,
407- ])
408- """:class:`~collections.OrderedDict ` that includes the autosummary sections
395+ member_sections = {
396+ ad .ClassDocumenter .member_order : 'Classes' ,
397+ ad .MethodDocumenter .member_order : 'Methods' ,
398+ ad .AttributeDocumenter .member_order : 'Attributes' ,
399+ }
400+ """:class:`dict ` that includes the autosummary sections
409401
410402 This dictionary defines the sections for the autosummmary option. The
411403 values correspond to the :attr:`sphinx.ext.autodoc.Documenter.member_order`
0 commit comments