File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,16 @@ Bugs fixed
1515 ``sphinx.ext.autodoc ``,
1616 especially when using :mod: `dataclasses ` as type metadata.
1717 Patch by Adam Turner.
18+ * #12589, #12626: autosummary: Fix warnings with :rst:role: `!autolink `.
19+ Patch by Adam Turner.
1820
1921Release 7.4.6 (released Jul 18, 2024)
2022=====================================
2123
2224Bugs fixed
2325----------
2426
25- * #12859 , #9743, #12609: autosummary: Do not add the package prefix when
27+ * #12589 , #9743, #12609: autosummary: Do not add the package prefix when
2628 generating autosummary directives for modules within a package.
2729 Patch by Adam Turner.
2830* #12613: Reduce log severity for ambiguity detection during inventory loading.
Original file line number Diff line number Diff line change @@ -765,7 +765,14 @@ def run(self) -> tuple[list[Node], list[system_message]]:
765765 try :
766766 # try to import object by name
767767 prefixes = get_import_prefixes_from_env (self .env )
768- import_by_name (pending_xref ['reftarget' ], prefixes )
768+ name = pending_xref ['reftarget' ]
769+ prefixes = [
770+ prefix
771+ for prefix in prefixes
772+ if prefix is None
773+ or not (name .startswith (f'{ prefix } .' ) or name == prefix )
774+ ]
775+ import_by_name (name , prefixes )
769776 except ImportExceptionGroup :
770777 literal = cast (nodes .literal , pending_xref [0 ])
771778 objects [0 ] = nodes .emphasis (self .rawtext , literal .astext (),
You can’t perform that action at this time.
0 commit comments