@@ -369,7 +369,6 @@ def get_items(self, names: list[str]) -> list[tuple[str, str | None, str, str]]:
369369
370370 result = StringList () # initialize for each documenter
371371 obj_type = _get_documenter (obj , parent )
372- doccls = env ._registry .documenters [obj_type ]
373372 if isinstance (obj , ModuleType ):
374373 full_name = real_name
375374 else :
@@ -379,7 +378,6 @@ def get_items(self, names: list[str]) -> list[tuple[str, str | None, str, str]]:
379378 # NB. using full_name here is important, since Documenters
380379 # handle module prefixes slightly differently
381380 self .bridge .result = result
382- documenter = doccls (self .bridge , full_name )
383381 props = _load_object_by_name (
384382 name = full_name ,
385383 objtype = obj_type ,
@@ -390,7 +388,7 @@ def get_items(self, names: list[str]) -> list[tuple[str, str | None, str, str]]:
390388 env = env ,
391389 events = events ,
392390 get_attr = get_attr ,
393- options = documenter . options ,
391+ options = self . bridge . genopt ,
394392 )
395393 if props is None :
396394 logger .warning (
@@ -400,7 +398,6 @@ def get_items(self, names: list[str]) -> list[tuple[str, str | None, str, str]]:
400398 )
401399 items .append ((display_name , '' , '' , real_name ))
402400 continue
403- documenter .props = props
404401
405402 # try to also get a source code analyzer for attribute docs
406403 real_module = props ._obj___module__ or props .module_name
@@ -413,7 +410,6 @@ def get_items(self, names: list[str]) -> list[tuple[str, str | None, str, str]]:
413410 logger .debug ('[autodoc] module analyzer failed: %s' , err )
414411 # no source file -- e.g. for builtin and C modules
415412 analyzer = None
416- documenter .analyzer = analyzer
417413
418414 # -- Grab the signature
419415
@@ -429,6 +425,10 @@ def get_items(self, names: list[str]) -> list[tuple[str, str | None, str, str]]:
429425
430426 # -- Grab the summary
431427
428+ doccls = env ._registry .documenters [obj_type ]
429+ documenter = doccls (self .bridge , full_name )
430+ documenter .props = props
431+ documenter .analyzer = analyzer
432432 documenter .add_content (None , indent = documenter .indent )
433433 lines = result .data [:]
434434 if props .obj_type != 'module' :
0 commit comments