| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The test checks, if ":meta private:" and ":meta public:" have an effect
in attributes of a class. Currently the new test cases fail.
The fix is in the next commit.
|
| |
|
|\
| |
| |
| |
| | |
tk0miya/10421_autodoc_preserve_defaults_for_classmethod
Fix #10421: autodoc_preserve_defaults doesn't work on class methods
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Autodoc fails to extract optional forwardrefs (ex. `Optional[MyClass]`)
even if `MyClass` is declared in `autodoc_type_aliases`.
|
|/
|
|
| |
Specifically: attributes, data, properties, and type variable bounds.
|
|\
| |
| | |
Fixed singledispatch documentation
|
| | |
|
| |
| |
| |
| |
| | |
It allows to suppress inherited members of several classes on the module at
once by specifying the option to `automodule` directive
|
|\ \
| | |
| | |
| | | |
10266_autodoc_preserve_defaults_crashes_on_kwonlyargs_without_defaults
|
| |/
| |
| |
| |
| |
| |
| | |
Basically, autodoc suppresses return value typehint for class
constructors. But it was unexpectedly shown if
`autodoc_docstring_signature` is enabled and docstring has multiple
signatures.
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Autodoc tried to scan doccomment on the module where the class defined.
But it failed to get it if the class is imported from other module.
This analyzes the target module to obtain the doccomment.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
In case of the descendants of generic class, the value of
obj.__orig_bases__ is incorrect because it returns original base
arguments for the child of the generic class instead of the target
class itself.
This uses obj.__dict__ to get the correct __orig_bases__ information.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `MethodDocumenter.get_doc` method added by
51ae283a38ed297df3fd5e0554dcc9acaa103e8c prevents
DocstringSignatureMixin from working correctly for __init__ and
__new__ methods. Additionally, the __new__ docstring was not obtained
correctly.
This commit checks for `self._new_docstrings` being set, and also
corrects the logic for obtaining the __new__ docstring.
There still remains the issue that when the class signature is
obtained from the signature of __init__ or __new__, only the real
signature is used, due to the use of `sphinx.util.inspect.signature`;
the autodoc_docstring_signature option does not have any effect.
|
|
|
|
|
| |
Since python 3.9, `classmethod` starts to support creating a "class
property". This supports to generate document for it.
|
| |
|
|
|
|
|
|
| |
Autoattribute directive should check the existence of instance attribute
that is defined inside __init__() but not having comments before
accessing it.
|
| |
|
|
|
|
|
|
| |
The special members are not treated as "attributes". So they're not
handled by DataDocumenter. This moves the detection to the earlier
step of filter_members().
|
|\
| |
| | |
Fix #8588: autodoc_type_aliases does not support dotted name
|
| |
| |
| |
| |
| | |
It allows users to define an alias for a class with module name
like `foo.bar.BazClass`.
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
When multiple singledispatch decorators are stacked, the first typehints
are copied to the subsequent definitions unexpectedly.
Now autodoc generates a dummy function not to affect typehints to
subsequent functions.
|
|/
|
|
|
| |
The metadata in docstring is invisible content. Therefore docstring
having only metadata should be treated as undocumented.
|
|\
| |
| | |
Overloaded function signatures do not require a separating backslash
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Add new tests to exercise the new autodoc_typehint_undoc option. Where
an existing test would have a meaningful behavior change with the new
option set to False, that test is copied, the new option is set to False
in the copy, and the assertions reflect the new expected behavior.
The new test test_autodoc_typehints_description_with_documented_init
illustrates the problem reported in #7329, and the new test
test_autodoc_typehints_description_with_documented_init_no_undoc
illustrates that this issue no longer occurs when the new
autodoc_typehint_undoc option is set to False.
|
|
|
|
|
|
|
|
|
|
| |
This generates `:canonical:` option for `:py:class:` directive if the
target class is imported from other module. It allows users to refer it
using both the new name (imported name) and the original name (canonical
name).
It helps a library that implements some class in private module (like
`_io.StringIO`), and publish it as public module (like `io.StringIO`).
|
|
|
|
|
| |
py:property directive now outputs py:property directive to describe
its type annotation.
|
|
|
|
|
|
|
|
| |
Add a new extension `sphinx.ext.autodoc.preserve_defaults`.
It preserves the default argument values of function signatures in source code
and keep them not evaluated for readability. This is an experimental
extension and it will be integrated into autodoc core in Sphinx-4.0.
|
| |
|
|\
| |
| | |
autodoc: Support type union operator (PEP-604) (refs: #8775)
|
| |
| |
| |
| |
| | |
Upgrade autodoc to support type union operator introduced in
PEP-604. It's available only with python 3.10+.
|
|/
|
|
|
|
|
|
| |
undocumented
Unintentionally, uninitialized attributes defined at superclasses are
recognized as undocumented in the filtering step. Therefore, they are
filtered if `:undoc-members:` option given.
|
|
|
|
|
|
|
|
|
|
| |
autodoc crashed when a decorator in mocked module takes arguments
because mock system returns the first argument for the decorator as a
decorated object.
This changes the approach for mocking decorators that remembers
arguments for each decoration, and fetch the latest argument on
generating document.
|