Commit Graph

3754 Commits

Author SHA1 Message Date
Walter Doerwald
798adc4f57 Add tests for html_signaturereturn_icon. 2021-05-22 20:15:11 +02:00
Takeshi KOMIYA
1513d50774 Merge branch '4.0.x' into 4.x 2021-05-13 01:51:57 +09:00
Takeshi KOMIYA
d18840b38d Fix test: the result of stringify_signature() has been changed randomly in py36 2021-05-13 01:40:45 +09:00
Takeshi KOMIYA
c341807991
Merge pull request #9185 from AWhetter/autodoc_typehints_both
autodoc.typehints can accurately represent overloads
2021-05-12 00:23:58 +09:00
Takeshi KOMIYA
86091934db Fix #9195: autodoc: The args of typing.Literal are wrongly rendered
They should be rendered as "repr" form.
2021-05-11 22:39:30 +09:00
Takeshi KOMIYA
71e732014f Merge branch '4.0.x' into 4.x 2021-05-11 02:35:15 +09:00
Takeshi KOMIYA
4ab0dba755 Fix #9205: py domain: canonical option causes xref resolution error
The :canonical: option causes "more than one target for
cross-reference" warning because the class having the same name is
registered.
2021-05-11 01:15:14 +09:00
Ashley Whetter
28d3f8136e autodoc.typehints can accurately represent overloads 2021-05-08 21:34:25 -07:00
Takeshi KOMIYA
d69c35b1a4 Fix #9175: autodoc: Special member is not documented in the module
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().
2021-05-08 17:33:33 +09:00
Takeshi KOMIYA
d82c8a7890
Merge pull request #9131 from RuRo/feature/glob-nitpick-ignore
Ignore nitpick warnings with regular expressions using `nitpick_ignore_regex`
2021-05-05 23:43:46 +09:00
Takeshi KOMIYA
1f860cb77e
Merge pull request #9146 from pbudzyns/autosummary-iattr-include
Autosummary to include instance attributes
2021-05-05 22:27:28 +09:00
Takeshi KOMIYA
77da494173
Merge pull request #9153 from tk0miya/9082_python3.10.0a7
Revert "test: Disable testing with python3.10"
2021-05-05 22:22:30 +09:00
Takeshi KOMIYA
531a5ae9ef test: Adjust type annotataions in python 3.10.0b1 2021-05-05 22:11:41 +09:00
Takeshi KOMIYA
f31af4b815 Merge branch '4.0.x' into 4.x 2021-05-03 22:31:51 +09:00
Takeshi KOMIYA
110fe1797c
Merge pull request #9159 from tk0miya/8588_nested_autodoc_type_aliases
Fix #8588: autodoc_type_aliases does not support dotted name
2021-05-03 22:30:01 +09:00
Takeshi KOMIYA
30efa3d947
Merge branch '4.x' into 8597_metadata_only_docstring 2021-05-03 22:11:10 +09:00
Takeshi KOMIYA
caa6579dbd Fix #8872: autodoc: stacked singledispatches are wrongly rendered
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.
2021-05-03 21:51:19 +09:00
Takeshi KOMIYA
8d54010675 Fix test: deprecation warning for extlinks 2021-05-03 18:52:19 +09:00
Takeshi KOMIYA
28ab5f233c Close #8588: autodoc: autodoc_type_aliases supports dotted name
It allows users to define an alias for a class with module name
like `foo.bar.BazClass`.
2021-05-03 18:47:47 +09:00
Takeshi KOMIYA
469def56b6 Fix #8597: autodoc: metadata only docstring is treated as undocumented
The metadata in docstring is invisible content. Therefore docstring
having only metadata should be treated as undocumented.
2021-05-02 23:17:58 +09:00
ruro
afa80dfe03
add tests for nitpick_ignore_regex 2021-05-02 14:54:00 +03:00
ruro
0aea6d318c
add tests for regular nitpick_ignore 2021-05-02 14:53:46 +03:00
ruro
bf2e69ad13
add nitpicky-warnings test root 2021-05-02 14:53:01 +03:00
Takeshi KOMIYA
d8a9f243e2 Close #8107: autodoc: Add class-doc-from option to autoclass directive
Add `class-doc-from` option to the `autoclass` directive to control
the content of the specific class.  It takes `class`, `init`, and `both`
like `autoclass_content`.
2021-05-01 14:53:06 +09:00
Pawel Budzynski
f12f5bc075 add tests 2021-04-29 14:48:56 +02:00
Takeshi KOMIYA
af6e63ab70 Merge branch '4.0.x' into 4.x 2021-04-29 15:06:16 +09:00
Takeshi KOMIYA
d8fa067583 Add doc and testcase for program directive (refs: #9137)
There is no docs and testcases for "None" argument of the program
directive.  It has been implemented since very old version.  But it's
not documented and tested long.
2021-04-28 02:16:57 +09:00
Takeshi KOMIYA
4582d5a396 refactor: Add testcase for mathjax3_config (refs: #9094) 2021-04-25 22:22:13 +09:00
Takeshi KOMIYA
d02a466cb5 Fix #9121: py domain: duplicated warning for canonical and alias
A duplicated warning is emitted when both canonical and its alias
objects are defined on the same document. But it should not be emitted
because they're the same object, not conflicted.
2021-04-23 01:19:18 +09:00
Takeshi KOMIYA
58ec5c4089 Fix #9110: autodoc: metadata of GenericAlias is not rendered as a reference in py37+
GenericAliasMixin should use `restify()` to render the metadata of
GenericAlias as py36 does.
2021-04-19 01:11:08 +09:00
Takeshi KOMIYA
e0ce61d533
Merge branch '4.0.x' into 9103_imgconverter_unexpected_conversion 2021-04-18 15:08:51 +09:00
Takeshi KOMIYA
c2c2b81f91 Fix #8818: autodoc: Super class having `Any` arguments causes nit-picky warning
On generating the base class information, unexpected nit-picky warning
for ``typing.Any`` was emitted.  This fixes it by using `~` prefix on
generating a cross-reference to make it valid.
2021-04-18 00:25:48 +09:00
Takeshi KOMIYA
5f56d4146e Fix #9103: LaTeX: imgconverter: conversion runs even if not needed
The imgconverter unexpectedly goes to convert even if the given image
is supported by the target builder when the image globbing is not used.
This enables format guess-ing on not globbed.
2021-04-17 16:51:19 +09:00
Takeshi KOMIYA
c7b169c5a9 Fix #8127: py domain: Ellipsis in info-field-list causes nit-picky warning
On parsing the types, the leading dot of the ellipsis (...) is considered
as a reference name.  And its first dot is considered as a notation for
relative type reference (ex. ".ClassName"). As a result, it was converted
double dots unexpectedly.

This changes the parsing rule to treat the ellipsis as a symbol, not a
name.
2021-04-17 02:06:57 +09:00
Jakob Lykke Andersen
7126503eeb Decl styling, update writers
Add test objects so all builders gets exposed to the new nodes.
Make the fallback node post-transform change desc_inline as well.
Make the html4, latex, and text writers handle desc_inline.
2021-04-12 19:07:51 +02:00
Jakob Lykke Andersen
f769dde254 Decl styling, fix html test 2021-04-12 19:07:51 +02:00
Jakob Lykke Andersen
87414faa92 Decl styling, fix cpp tests 2021-04-12 19:07:51 +02:00
Jakob Lykke Andersen
14f7d243bd Decl styling, more nodes and C++ conversion 2021-04-12 19:05:58 +02:00
Takeshi KOMIYA
ce5d66e618
Merge pull request #9053 from tk0miya/title_node_for_toctree_caption
Fix #8870: Use title node for the caption of toctree
2021-04-09 01:35:46 +09:00
Takeshi KOMIYA
5604f9c420 Fix #8870: Use title node for the caption of toctree
Since docutils-0.17, the caption node should not use for the non-figure
nodes.  Therefore, this replaces it by the title node.
2021-04-09 01:02:29 +09:00
Takeshi KOMIYA
70ea4381ca
Merge pull request #8841 from AWhetter/autodoc_signatures_without_backslash
Overloaded function signatures do not require a separating backslash
2021-04-04 18:02:01 +09:00
Takeshi KOMIYA
8d60b04844 Fix CI: NameError for missing docutils variable in test_build_html 2021-04-04 00:28:08 +09:00
Takeshi KOMIYA
41a377fee5 Merge branch '3.x' 2021-04-04 00:06:45 +09:00
Takeshi KOMIYA
a6d9b24a3b test: Update testcase for docutils-0.17 (toctree caption)
Since v0.17, docutils starts to use <figcaption> for caption on HTML
output.  This modifies the expected value of our testcases to support
it.
2021-04-03 23:54:19 +09:00
Takeshi KOMIYA
84b9d49826 test: Update testcase for docutils-0.17 (<section>)
Since v0.17, docutils starts to use <section> for section on HTML
output.  This modifies the expected value of our testcases to support
it.
2021-04-03 23:54:19 +09:00
Takeshi KOMIYA
6e438af6c0 test: Update testcase for docutils-0.17 (empty language)
Since v0.17, docutils starts to load language module on parsing reST
document using StateMachine directly.  So far, our testcase uses invalid
language code for testing autosummary.  This fixes it to work with new
docutils.
2021-04-03 23:54:19 +09:00
Takeshi KOMIYA
c2ee74f166 test: Update testcase for docutils-0.17 (<figure> and <figcaption>)
Since v0.17, docutils starts to use <figure> and <figcaption> for figure
and its caption on HTML output.  This modifies the expected value of our
testcases to support it.
2021-04-03 23:54:19 +09:00
Takeshi KOMIYA
ddb6e9c61c
Merge pull request #8539 from godlygeek/description_typehints_for_classes
Make autodoc_typehints="description" work with autoclass_content="class"
2021-04-03 23:28:08 +09:00
Takeshi KOMIYA
bdbabb14c2 Merge branch '3.x' 2021-04-03 13:22:21 +09:00
Takeshi KOMIYA
ec4d410c48 Fix testcase: the signature of Enum class has been changed since HEAD of 3.10 2021-04-03 13:08:31 +09:00