Commit Graph

17281 Commits

Author SHA1 Message Date
Takeshi KOMIYA
3ad1e5e7d1
Merge pull request #9064 from tk0miya/refactor_type_annotation
refactor: Add Optional to type annotations
2021-04-08 21:42:21 +09:00
Takeshi KOMIYA
01cac597e3
Merge pull request #9057 from tk0miya/refactor_vartypes
refactor: Use PEP-526 based variable annotation
2021-04-08 10:57:37 +09:00
Takeshi KOMIYA
d3f0de4e12 refactor: Add Optional to type annotations 2021-04-08 01:56:50 +09:00
Takeshi KOMIYA
eb68c237dd refactor: Use PEP-526 based variable annotation 2021-04-08 01:54:17 +09:00
Takeshi KOMIYA
245b3c32df
Merge pull request #9055 from tk0miya/refactor_type_annotation2
refactor: use raw Type for type annotations
2021-04-08 01:19:54 +09:00
Takeshi KOMIYA
8a3ea45f9a
Merge branch 'master' into refactor_type_annotation2 2021-04-08 00:48:15 +09:00
Takeshi KOMIYA
6781c66976
Merge pull request #9054 from tk0miya/refactor_docfields2
refactor: Lazy loading is not needed for type annotations
2021-04-08 00:47:20 +09:00
Takeshi KOMIYA
2f320c1a8d Update CHANGES for PR #8841 2021-04-04 18:04:51 +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
1b0d4672a4 refactor: use raw Type for type annotations 2021-04-04 14:47:43 +09:00
Takeshi KOMIYA
8d3708a174 refactor: Lazy loading is not needed for type annotations 2021-04-04 14:29:36 +09:00
Takeshi KOMIYA
f7a2e081c8 Update CHANGES for PR #9036 2021-04-04 13:41:55 +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
8e258c0eb9 Merge branch '3.5.x' into 3.x 2021-04-04 00:05:46 +09:00
Takeshi KOMIYA
64b69ad565
Merge pull request #8870 from tk0miya/test_with_docutils0.17b1
test: Do test with docutils-0.17b1
2021-04-04 00:05:13 +09:00
Takeshi KOMIYA
cf2d11f947 test: Do test with docutils-0.17 (final) 2021-04-03 23:54:41 +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
26d0bb641b test: Do test with docutils-0.17b1 2021-04-03 23:54:19 +09:00
Takeshi KOMIYA
a476559abf Update CHANGES for PR #8539 2021-04-03 23:33:35 +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
2b1d745c1b
Merge pull request #9035 from tk0miya/refactor_vartypes_search
refactor: Use PEP-526 based variable annotation (sphinx.search)
2021-04-03 14:13:16 +09:00
Takeshi KOMIYA
604faf5341
Merge pull request #9034 from tk0miya/refactor_vartypes_pycode
refactor: Use PEP-526 based variable annotation (sphinx.pycode)
2021-04-03 14:12:56 +09:00
Takeshi KOMIYA
3ac1c60c41
Merge pull request #9041 from albertvillanova/patch-1
Fix typo in docs
2021-04-03 14:09:49 +09:00
Takeshi KOMIYA
bdbabb14c2 Merge branch '3.x' 2021-04-03 13:22:21 +09:00
Takeshi KOMIYA
8dbacb1442 Merge branch '3.5.x' into 3.x 2021-04-03 13:22:06 +09:00
Takeshi KOMIYA
c6c970e322
Merge pull request #9048 from tk0miya/fix_enum_sig
Fix testcase: the signature of Enum class has been changed since HEAD of 3.10
2021-04-03 13:21:46 +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
Takeshi KOMIYA
55ed1ecb66
Merge pull request #9042 from brechtm/patch-1
Docs: fix typo in env-merge-info
2021-04-03 01:04:33 +09:00
Brecht Machiels
ac0dcddeb8
Docs: fix typo in env-merge-info 2021-03-30 16:44:50 +02:00
Albert Villanova del Moral
260725c823
Fix minor typo 2021-03-30 08:45:34 +02:00
Matt Wozniski
4c72848b85 Test autodoc_typehint_undoc
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.
2021-03-27 14:54:38 -04:00
Matt Wozniski
be2cee53a1 Use __init__ type hints in "description" mode
Previously, `__init__` type hints were not used when documenting a class
using `autodoc_typehints="description"`. This was done to prevent
documentation for parameters from showing up twice, both for the class
and the `__init__` special method. As the new ``autodoc_typehint_undoc``
option provides a better way to prevent this bad behavior by placing the
user in control of where the type hints are added, it is now safe to add
type hints for documented `__init__` parameters.

Closes #8178
2021-03-27 14:54:38 -04:00
Matt Wozniski
4785f32ddf Add autodoc_typehint_undoc option
Previously, if autodoc_typehints="description", a :type: field would be
added for every parameter and return type appearing in the annotation,
including **kwargs and underscore-prefixed parameters that are meant to
be private, as well as None return types.

This commit introduces a new option, "autodoc_typehint_undoc".  By
default this option is True, requesting the old behavior. By setting
this option to False, :type: and :rtype: fields will only be added for
annotated parameters or return types if there is already a corresponding
:param: or :return: field, to put users in control over whether a given
parameter is documented or not.
2021-03-27 14:54:37 -04:00
Ashley Whetter
94b5607591 Overloaded function signatures do not require a separating backslash 2021-03-27 10:25:20 -07:00
Takeshi KOMIYA
e888a44249
Merge pull request #9026 from tk0miya/5603_autodoc_canonical
Close #5603: autodoc: Allow to refer to a python object using canonical name
2021-03-27 17:45:38 +09:00
Takeshi KOMIYA
acf66bc4d5 Close #5603: autodoc: Allow to refer to a python object using canonical name
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`).
2021-03-27 17:34:15 +09:00
Takeshi KOMIYA
cd75f8fea1 Merge branch '3.x' 2021-03-27 17:33:49 +09:00
Takeshi KOMIYA
b342300c5e Merge branch '3.5.x' into 3.x 2021-03-27 17:30:50 +09:00
Takeshi KOMIYA
6a873cae0b
Merge pull request #9038 from tk0miya/fix_linkcheck_ci
Fix the testcase for linkcheck refers removed URLs
2021-03-27 17:25:58 +09:00
Takeshi KOMIYA
26d9a8962e Fix the testcase for linkcheck refers removed URLs
Some public URLs are disabled now.
For more details, see https://github.com/sphinx-doc/sphinx/issues/8309
2021-03-27 17:10:09 +09:00
Takeshi KOMIYA
06c59d2723
Merge pull request #9033 from stratakis/typos
Fix some local parameter names
2021-03-27 00:47:43 +09:00
Takeshi KOMIYA
94dc1d78a4 refactor: Use PEP-526 based variable annotation (sphinx.search) 2021-03-27 00:46:55 +09:00
Takeshi KOMIYA
b9f0582f06 refactor: Use PEP-526 based variable annotation (sphinx.pycode) 2021-03-27 00:41:15 +09:00
Takeshi KOMIYA
d27bdce2d7
Merge pull request #9031 from tk0miya/refactor_vartypes_env
refactor: Use PEP-526 based variable annotation (sphinx.environment)
2021-03-27 00:36:24 +09:00
Takeshi KOMIYA
1b66532c0e
Merge branch 'master' into typos 2021-03-27 00:34:41 +09:00
Charalampos Stratakis
2a90b28d61 Fix some local parameter names 2021-03-25 18:17:45 +01:00