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.
So far, autoattribute uses "given class name" to fetch comments of
uninitialized instance attributes. But pycode expects to use "real"
class name on searching attribute comments.
This adds UninitializedInstanceAttributeMixin to handle it simply.
The utility function movefile() was added in
677d096393 to handle existing files on
Windows. Since Python 3.3, the stdlib function os.replace() fills this
role.
- url_root is set to `#` on the index page, which layout.html tries to
change back to `''` (the empty string).
- But, this updated url_root wasn't used in the actual location, as an
argument to `documentation_options.js`.
- Thus, clever enough templates, which tried to use
`$DOCUMENTATION_OPTIONS.URL_ROOT` inside javascript would fail.
This was manifested as broken links, which led to this issue:
https://github.com/executablebooks/sphinx-copybutton/issues/110
- I have eventually traced that back to sphinx itself, and found that
layout.html tried to fix the problem, but the fixed value wasn't
used.
- This fix works in my basic test, but I will continue with more tests.
- Review:
- someone more clever should examine this and make sure it makes
sense
- This does not have tests. Should it?