Commit Graph

16493 Commits

Author SHA1 Message Date
Takeshi KOMIYA
d49f3a1c78 refactor: autosummary: Deprecate _simple_info() and _simple_warn() 2021-01-20 02:23:34 +09:00
Takeshi KOMIYA
a7b6b6bb7f
Merge pull request #8703 from tk0miya/refactor_viewcode2
refactor: viewcode: Fix type annotations
2021-01-19 21:18:59 +09:00
Takeshi KOMIYA
ef7f57325c Update CHANGES for PR #8658 2021-01-19 21:17:26 +09:00
Takeshi KOMIYA
ca0677086d
Merge pull request #8658 from SolidifiedRay/feature-custom-section
Close #8573: napoleon: Add more custom section styles
2021-01-19 21:13:13 +09:00
SolidifiedRay
7ad85cd1e0 Close #8573: napoleon: Add more custom section styles 2021-01-18 11:43:40 -08:00
Takeshi KOMIYA
84150b2106 refactor: viewcode: Fix type annotations 2021-01-19 02:51:03 +09:00
Takeshi KOMIYA
40f2c832ff
Merge pull request #8698 from tk0miya/8681_viewcode_incremental_build
Close #8681: viewcode: Support incremental build
2021-01-19 02:42:21 +09:00
Takeshi KOMIYA
9f7998b66d
Merge pull request #8697 from tk0miya/1112_download_duplicated_copies
Fix #1112: download role creates duplicated copies
2021-01-19 02:40:54 +09:00
Takeshi KOMIYA
a7e77c01e4
Merge pull request #8699 from tk0miya/refactor_viewcode
refactor: viewcode: Use a constant for dirname
2021-01-19 02:30:49 +09:00
Takeshi KOMIYA
2e01c34acf Close #8681: viewcode: Support incremental build
Now viewcode supports incremental build. It generates HTML files only
when the original python code is updated from last build.
2021-01-19 02:30:11 +09:00
Takeshi KOMIYA
bc56384fb9 Fix #1112: download role creates duplicated copies
`:download:` role creates duplicated copies when the document contains
two or more the role for the same file, but in different form.  It
considers two paths are different when one contains relative path like
`path/to/../file.dat`.

Internally, `env.relfn2path()` does not normalize the given path in
relative form.  As a result, download role can't detect the same paths
are given.  This adds `os.path.normpath()` to `env.relfn2path()` to
normalize the path.
2021-01-19 02:27:20 +09:00
Takeshi KOMIYA
de0a4ee198 refactor: viewcode: Use a constant for dirname 2021-01-18 02:19:30 +09:00
Takeshi KOMIYA
596dfba841
Merge pull request #8695 from tk0miya/8514_default_value_of_overloads
Close #8514: autodoc: Default values of overloads are taken from actual implementation
2021-01-18 00:15:56 +09:00
Takeshi KOMIYA
240f7550ae
Merge pull request #8694 from tk0miya/8693_defvalue_for_overloaded_functions
Fix #8693: autodoc: Default values for overloads are rendered as string
2021-01-18 00:14:20 +09:00
Takeshi KOMIYA
2e660fbcb4
Merge pull request #8692 from tk0miya/refactor_writers
refactor: Remove meaningless variable: attrs
2021-01-17 19:27:21 +09:00
Takeshi KOMIYA
d88166e84b Close #8514: autodoc: Default values of overloads are taken from actual implementation
As a well-known idiom, mypy recommends to use ellipsis ("...") for
default argument values as a elided style.  This allows to write the
style and helps to document it with copying the default argument
values from actual implementation.

Note: This does not copy the default argument value when the argument
of overloaded function has its own default value.
2021-01-17 02:32:50 +09:00
Takeshi KOMIYA
425cd1af02 Fix #8693: autodoc: Default values for overloads are rendered as string
The default values for overloaded functions are rendered as string
literal unexpectedly because autodoc extracts code snippets from
the source code, not actual value (ex. int, ellipsis, and so on).

This introduces a simple wrapper class; `DefaultValue` to render these
code snippets like actual values, not string literals.
2021-01-17 02:30:20 +09:00
Takeshi KOMIYA
8f5744be5e refactor: Remove meaningless variable: attrs
It would be better to use `name in node` and `node[name]` to check and
access an attribute of the node instead of `node.attributes`.
2021-01-16 22:46:18 +09:00
Takeshi KOMIYA
7c340e1c1c
Merge pull request #8691 from tk0miya/add_readthedocs.yml
Fix #8662: Add .readthedocs.yml
2021-01-16 21:42:18 +09:00
Takeshi KOMIYA
90ab89311f
Merge pull request #8667 from tk0miya/8652_invalid_type_comments
Fix #8652: autodoc: variable comments are ignored if invalid type comments found
2021-01-16 21:40:34 +09:00
Takeshi KOMIYA
8ce830e1cb Fix #8662: Add .readthedocs.yml 2021-01-16 21:31:50 +09:00
Takeshi KOMIYA
d635d94eeb
Merge pull request #8685 from tk0miya/8683_strftime_z
Fix #8683: html_last_updated_fmt does not support UTC offset (%z)
2021-01-14 01:11:24 +09:00
Takeshi KOMIYA
b742bde8e6
Merge pull request #8684 from tk0miya/2030_automatic_dedent
Fix #2030: automatic dedent support in code-block directive
2021-01-14 01:11:02 +09:00
Takeshi KOMIYA
f81310708b
Merge pull request #8678 from tk0miya/doc_html_baseurl
Fix #8677: doc: Update description of html_baseurl
2021-01-14 01:10:12 +09:00
Takeshi KOMIYA
fddc42847f Fix #2030: automatic dedent support in code-block directive 2021-01-13 01:10:28 +09:00
Takeshi KOMIYA
6101077aab
Merge pull request #8680 from tk0miya/deprecate_DocumenterBridge.reporter
refactor: Deprecate DocumenterBrdige.reporter
2021-01-13 01:08:45 +09:00
Takeshi KOMIYA
233e359330
Merge pull request #8679 from tk0miya/8651_xref_for_rubric
Fix #8651: cross-reference for a rubric having inline item is broken
2021-01-13 01:01:36 +09:00
Takeshi KOMIYA
8ff8b5532c Fix #8683: html_last_updated_fmt generates wrong time zone for %Z
sphinx.util.i18n:format_date() converts '%Z' to full name of time zone
unexpectedly.  It should be converted to short name.
2021-01-13 00:50:01 +09:00
Takeshi KOMIYA
d5559e1ba2 Fix #8683: html_last_updated_fmt does not support UTC offset (%z)
sphinx.util.i18n:format_date() does not support %z so far.  This
adds a mapping for %z to the babel form 'ZZZ'.
2021-01-13 00:49:59 +09:00
Jakob Lykke Andersen
e314789f4f
Merge pull request #8682 from jakobandersen/c_intersphinx_8341
C, C++, fix intersphinx and role lookup types
2021-01-11 21:22:04 +01:00
Jakob Lykke Andersen
88102c5188 Update CHANGES 2021-01-11 20:52:02 +01:00
Jakob Lykke Andersen
f7a1d66359 C++, fix object types for xrefs
Make them all work with intersphinx.
Strengthen templateParam a bit.
2021-01-11 20:51:36 +01:00
Jakob Lykke Andersen
750e6ec431 C, fix object types for xrefs
Add 'identifer' to all and 'type' to types.

Fixes sphinx-doc/sphinx#8341
2021-01-11 20:51:36 +01:00
Takeshi KOMIYA
dffb565eea refactor: Deprecate DocumenterBrdige.reporter
The logging system of Sphinx was migrated to sphinx.util.logging now.
So it's time to deprecate reporter interface for Documenters.
2021-01-12 01:48:16 +09:00
Takeshi KOMIYA
12ec8f0cae Fix #8651: cross-reference for a rubric having inline item is broken
The implementation of the standard domain so far has considered the
first child of the rubric node is the title of the rubric.  But it can
may multiple nodes when the rubric title is marked up.

This extracts the title of the rubric from the whole of the children
of it.
2021-01-11 22:50:45 +09:00
Takeshi KOMIYA
b372a99c01
Merge pull request #8674 from tk0miya/207_multiple_highlight_options
Close #207: Now highlight_language supports multiple languages
2021-01-11 21:49:29 +09:00
Takeshi KOMIYA
32ac5f2e57 Close #207: Now highlight_language supports multiple languages
This changes the structure of `highlight_options` to a dictionary that
maps language names to option dictionary.  It allows to setting pygments
options for multiple languages at once.
2021-01-11 21:40:09 +09:00
Takeshi KOMIYA
2444c4711e
Merge pull request #8675 from tk0miya/test_pydomain_abbr
test: Add testcase for relative/short xref for py domain
2021-01-11 21:32:03 +09:00
Takeshi KOMIYA
98993b40c5
Merge pull request #8672 from tk0miya/8671_highlight_options_not_working
Fix #8671: highlight_options is not working
2021-01-11 20:48:54 +09:00
Takeshi KOMIYA
d7cdb9e22d Fix #8671: highlight_options is not working
Sadly HTML and LaTeX writers compares the highlight languages using
`is` operator.  As a result, it has not worked even if languages are
same.  This replaces the comparison operator by `==`.
2021-01-11 20:37:05 +09:00
Takeshi KOMIYA
6e445e1175
Merge pull request #8673 from tk0miya/refactor_writers
refactor: Access config object from self directly in writers
2021-01-11 20:35:39 +09:00
Takeshi KOMIYA
5d07135a1e Fix #8677: doc: Update description of html_baseurl 2021-01-11 19:45:55 +09:00
Takeshi KOMIYA
a3df1d00c7 test: Add testcase for relative/short xref for py domain 2021-01-11 03:12:39 +09:00
Takeshi KOMIYA
410b8e03f3 refactor: Access config object from self directly in writers 2021-01-10 23:49:12 +09:00
Takeshi KOMIYA
b51c947c51
Merge pull request #8670 from tk0miya/fix_highlight_lang
doc: Fix highlight language
2021-01-10 22:35:00 +09:00
Takeshi KOMIYA
f433581b04 doc: Fix highlight language 2021-01-10 22:22:30 +09:00
Takeshi KOMIYA
eaa8612567 Fix #8652: autodoc: variable comments are ignored if invalid type comments found
To avoid the crash of ModuleAnalyzer from invalid type comments, this
start to retry parsing without type_comments=False when `ast.parse()`
raises SyntaxError.
2021-01-10 17:08:56 +09:00
Takeshi KOMIYA
7acafa991b Update CHANGES for PR #8665 2021-01-10 15:04:59 +09:00
Takeshi KOMIYA
ffba1d7068
Merge pull request #8665 from JeanKossaifi/3.x
Cast maxdepth to int in toctree
2021-01-10 15:03:03 +09:00
Jean Kossaifi
169c45bb35 Deal with empty string case. 2021-01-09 22:14:16 +00:00