-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tracker] Issues related to autodoc and "undefined reference" #11991
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
1 task
#10793 should be added to the list under the " The issue was tagged as This has been reported several times but I couldn't find an "exact" duplicate as comparable posts also conflate other issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue serves as a tracker for issues related to autodoc and its inhability to render types. Feel free to dump the issues you find relevant and I'll add them to this tracker. That way, people can easily find them and we can also find what is missing or not.
TYPE_CHECKING
guarded importsif TYPE_CHECKING
imports #11225automodule
does not work withTYPE_CHECKING
guarded code #13137Forward References and
from __future__ import annotations
Type variables and new types treated as
data
instead ofclass
NewType
instances to be data, but autodoc considers them a class #11552Undefined references to
pathlib.Path
and co.pathlib
objects are incorrectly picked up by autodoc #13178None
andOptional
not linking correctly:None
is no longer hyperlinked after 4.4.0 #10899Using optional as keyword misidentified as type:
Literal
types not linking correctly:autodoc_type_aliases
not working withtyping.Literal
type aliases... #10525Returns
section types not linking:Yield
section types not linking correctly:Generic types not linking:
@dataclass
specific linking bugs:@property
return type:autodoc-process-signature
does not populate return signature for properties #10396General alias linking problems:
default_role
aware of aliases. #9453Napoleon specific:
Docstring extraction
str
#12020Miscellaneous
Return type
sections to be generated in autoclass #12472Under consideration (Python 3.9 failure only)
Tasks issues
autodoc_type_aliases
#11687ModuleAnalyzer
#11688Possible solutions
For people that want some solutions:
autodoc_type_aliases
(the support is limited and does not work for missing references in class signatures for instance).nitpick_ignore
(it does not solve everything but at least you know what is wrong). Be careful though since sometimes names are incorrectly resolved because they are thought to be the same... (e.g., importingdocutils.nodes.Node
and_pytest.nodes.Node
asNode
and usingNode
in an annotation uses the first reference it finds ifNode
is not available at runtime, e.g., guarded in a TYPE_CHECKING block).The text was updated successfully, but these errors were encountered: