Linkcheck organizes the URLs to checks in a PriorityQueue. The items are
tuples (priority, url, docname, lineno).
Tuples where the lineno is `None` are not comparable with tuples that
have an integer lineno, and PriorityQueue items must be comparable (see
https://bugs.python.org/issue31145).
Fixes an issue when a document contains two links to the same URL, one
with an int line number and the other without line number metadata (such
as an image :target: attribute).
Using 0 instead of None to represent no line number should not lead to
observable changes, the result logger only logs the line number when it
is truthy.
Close#8565
The instance attributes on subclasses are shown on the document of
parent class unexpectedly because of autodoc modifies `__annotations__`
in place. This fix creates a copy of `__annotations__` attribute and
attach it to the subclass.
The instance variables defined at __init__() method are basically
initialized. So it's not appropriate to call them as "uninitialized".
So this renames the documenter for them to
RuntimeInstanceAttributeMixin.
Since 1bf7fe424, ``-D gettext_compact=0`` is not treated as disabling
the feature. It is recognized as creating ``0.pot`` because its type is
Any. This changes it to `[bool, str]`.
The searching context like py:module and py:class are missing in the
pending_xref nodes generated from info-field-lists. This sets these
searching context info to them.
To support instance attributes on super class, get_class_members() scans
the instance attributes defined at super classes using ModuleAnalyzer.
It allows to generate document for them when users gives :
inherited-members: option.
To avoid filtering __slots__ attributes having docstring at
filter_members(), this passes docstring captured at get_class_members()
to the filter_members() via ObjectMember.
To enhance ClassDocumenter, Add a new helper function get_class_members().
At this moment, it is a copy of get_object_members(). It will be
changed to return more detailed information of class members.
So far, autodoc obtains type annotations of instance attributes by
ModuleAnalyzer directly. As a result, autodoc_type_aliases are ignored
for these variables.
This goes to merge type annotations from the class itself and
ModuleAnalyzer's, and get type annotations using `typing.get_type_hints()`
to apply autodoc_type_aliases.