Adam Turner
bde47ce679
Add test for duplicated submodules in sphinx.ext.apidoc
2022-05-01 06:12:25 +01:00
Adam Turner
e7cea69954
Revert removal of jsdump
implementation
2022-04-30 19:10:27 +01:00
Adam Turner
4674cc11c8
.write_text(...)
-> .write_text(..., encoding='utf8')
2022-04-27 03:11:08 +01:00
Adam Turner
24e3b7c8c8
.read_text()
-> .read_text(encoding='utf8')
2022-04-27 03:04:19 +01:00
Adam Turner
b536ffabc1
Deprecate sphinx.util.jsdump
2022-04-27 02:59:50 +01:00
Adam Turner
e2595b6cbe
Review: Use list
2022-04-24 17:55:05 +01:00
Adam Turner
35ed39c946
Use Node.findall
2022-04-22 04:21:39 +01:00
Adam Turner
0447fbe60d
Use docutils.__version_info__ directly
2022-04-22 04:21:38 +01:00
Adam Turner
a8827f3329
Catch DeprecationWarning
for docutils.frontend.OptionParser
2022-04-22 04:21:38 +01:00
Adam Turner
55669f6cfc
Specify encoding
2022-04-22 04:21:12 +01:00
Adam Turner
c08bffde98
Address warnings in test_util_i18n.py
2022-04-22 04:05:41 +01:00
Jakob Lykke Andersen
2ec069ba9c
C and C++, support attribtues on enumerators
...
Fixes sphinx-doc/sphinx#10341
2022-04-17 17:27:30 +02:00
Jakob Lykke Andersen
991fe26fa5
C and C++, refactor attribute lists
2022-04-17 17:17:19 +02:00
Jakob Lykke Andersen
7dd1e5bbcf
C++, simplify assginemnt-expression parsing
2022-04-17 14:22:24 +02:00
Jakob Lykke Andersen
a36c09a97f
C++, use Itanium mangling for conditional expr
2022-04-17 14:22:24 +02:00
Jeremy Maitin-Shepard
2d2e0ac01a
[C++] Support conditional operator "?"
2022-04-17 14:22:24 +02:00
Takeshi KOMIYA
a66adb1c32
Fix #10305 : autodoc: Failed to extract optional forwardrefs
...
Autodoc fails to extract optional forwardrefs (ex. `Optional[MyClass]`)
even if `MyClass` is declared in `autodoc_type_aliases`.
2022-04-17 03:09:11 +09:00
jfbu
184f98ae95
LaTeX: correct footnote marks, extended with page of link target
...
Fix #10188
Footnotes in some LaTeX environments (tables, fulllineitems for object
descriptions) are gathered and appear after the environment, causing the
footnote to possibly appear on a page later than some of the footnote
marks referring it.
With this commit, the footnote mark compares page numbers and
incorporates the destination page number if it turns out to be distinct
from the page where it stands.
2022-04-16 19:33:18 +02:00
zuqq
a450518bb1
Apply autodoc_typehints_format
to all type hints
...
Specifically: attributes, data, properties, and type variable bounds.
2022-04-08 20:27:24 +01:00
Takeshi KOMIYA
f5b3804060
Merge pull request #10285 from jmp1985/master
...
Fixed singledispatch documentation
2022-04-05 02:30:53 +09:00
Takeshi KOMIYA
3d2c54eb47
Fix a testcase for py36
2022-04-05 01:08:58 +09:00
Takeshi KOMIYA
67708e7bb5
Fix a testcase
2022-04-04 23:48:29 +09:00
James Parkhurst
88b213bbf0
Added test case
2022-04-04 11:45:58 +01:00
Takeshi KOMIYA
da73960492
Merge branch '5.x' into autodoc_force_undocumented_rtype
2022-04-03 22:45:42 +09:00
Takeshi KOMIYA
e38c1bda01
Fix a testcase
2022-04-03 22:44:12 +09:00
Takeshi KOMIYA
fd42063725
autodoc_typehints_description_target: Rename returnvalue_and_documented_params to documented_params
2022-04-03 22:42:44 +09:00
Takeshi KOMIYA
f731bf1999
Merge branch '5.x' into autodoc_force_undocumented_rtype
2022-04-03 22:29:22 +09:00
Takeshi KOMIYA
21e3a96f09
Close #8417 : autodoc: :inherited-members: option now takes multiple classes
...
It allows to suppress inherited members of several classes on the module at
once by specifying the option to `automodule` directive
2022-04-03 20:17:41 +09:00
Takeshi KOMIYA
7bdc11e87c
Merge pull request #10323 from tk0miya/10318_literalinclude_prepend_and_dedent
...
Fix #10318 : literalinclude: :prepend: option working with :dedent:
2022-04-03 20:13:39 +09:00
Takeshi KOMIYA
9d81843b82
Merge pull request #10321 from tk0miya/10266_autodoc_preserve_defaults_crashes_on_kwonlyargs_without_defaults
...
Fix #10266 : autodoc_preserve_defaults crashes on kwonlyargs w/o defaults
2022-04-03 17:20:25 +09:00
Takeshi KOMIYA
020a1f9187
Merge pull request #10313 from GutiCW/feature-support_mocked_decorator_for_class_methods
...
Support mocked decorator for class methods
2022-04-03 17:16:39 +09:00
Takeshi KOMIYA
0d31fc9614
Merge branch '5.x' into 10266_autodoc_preserve_defaults_crashes_on_kwonlyargs_without_defaults
2022-04-03 16:57:32 +09:00
Takeshi KOMIYA
a78c07ca07
Fix #10280 : autodoc_docstring_signature generates needless return typehint
...
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.
2022-04-03 16:32:35 +09:00
Takeshi KOMIYA
e571479d54
Fix #10318 : literalinclude: :prepend: option working with :dedent:
...
It will always be warned because prepending is processed before
dedenting. This changes the order of processing options.
2022-04-02 23:39:47 +09:00
Takeshi KOMIYA
f5e4e70817
Fix #10266 : autodoc_preserve_defaults crashes on kwonlyargs w/o defaults
2022-04-02 16:55:48 +09:00
Christian Walch
57d6ec7697
Extend test_mock_decorator
for class method.
2022-04-01 07:37:07 +02:00
Takeshi KOMIYA
223b1a94f2
Merge branch '4.x'
2022-03-28 01:00:37 +09:00
Takeshi KOMIYA
4a496bfc98
Merge pull request #10178 from stephenfin/issue-10177
...
Revert "Close #9993 : std domain: Allow to refer an inline target via ref role"
2022-03-27 23:10:52 +09:00
Takeshi KOMIYA
b20e04968e
Merge pull request #10107 from Jean-Abou-Samra/intl-warnings
...
Implement #noqa for i18n
2022-03-27 23:00:57 +09:00
Takeshi KOMIYA
2db180da70
Merge branch '4.x'
2022-03-27 19:47:11 +09:00
Takeshi KOMIYA
c6230dc4db
extlinks: Disable hardcoded links detector by default (refs: #10126 )
...
The hardcoded links detector added since 4.4.0 causes troubles in many
projects. Therefore, this disables it by default, and adds a new
configuration `extlinks_detect_hardcoded_links` to enable it explicitly.
2022-03-27 15:22:11 +09:00
Hugo van Kemenade
658689433e
Include trailing / in PEP URL to avoid 301 redirect
2022-03-24 13:31:17 +02:00
Jeremy Maitin-Shepard
099b54cb87
Make code role highlighting consistent with code-block directive
...
Fixes https://github.com/sphinx-doc/sphinx/issues/5157
This is factored out of the sphinx-immaterial theme:
1ef121a612/sphinx_immaterial/inlinesyntaxhighlight.py (L1)
See also:
https://github.com/sphinx-doc/sphinx/pull/6916
2022-03-19 20:37:49 -07:00
Adam Turner
61d7b0b47c
Replace jssplitter
with JavaScript
2022-03-19 23:16:27 +00:00
Takeshi KOMIYA
168adb0f0e
test: Fix test_markup does not use default settings for docutils
2022-03-19 22:58:27 +09:00
Takeshi KOMIYA
aa1bc83c2a
Merge branch '4.x'
2022-03-19 22:58:15 +09:00
Takeshi KOMIYA
017ef6118b
Merge branch '4.4.x' into 4.x
2022-03-19 22:56:54 +09:00
Takeshi KOMIYA
2f85b1a402
test: empty tuple type is now repesented w/o args since py3.11
...
refs: 15df8f8d89
2022-03-19 17:10:13 +09:00
Michal Čihař
ef79a2bc70
environment: Update default value for pep_base_url
...
This matches docutils change in https://sourceforge.net/p/docutils/code/9045/
Fixes #10253
2022-03-16 13:57:51 +01:00
Matyas Novak
07b2a050c7
Test recognition of a documented instance of a class as a non-imported member of the module
2022-03-14 23:31:33 +01:00
Takeshi KOMIYA
b12b39db05
Merge pull request #10212 from AA-Turner/remove-module-docstring-titles
...
Remove module docstring titles
2022-03-14 02:14:17 +09:00
Jakob Lykke Andersen
9362df53be
C++, minor formatting
2022-03-12 20:05:26 +01:00
Jeremy Maitin-Shepard
a9a5cec681
Update tests/test_domain_cpp.py
...
Co-authored-by: Jakob Lykke Andersen <jakobandersen@users.noreply.github.com>
2022-03-11 05:03:05 -08:00
Jeremy Maitin-Shepard
2c1e4c437e
Update tests/test_domain_cpp.py
...
Co-authored-by: Jakob Lykke Andersen <jakobandersen@users.noreply.github.com>
2022-03-11 05:02:59 -08:00
Jeremy Maitin-Shepard
ce82f9ee9c
Update tests/test_domain_cpp.py
...
Co-authored-by: Jakob Lykke Andersen <jakobandersen@users.noreply.github.com>
2022-03-11 05:02:54 -08:00
Jeremy Maitin-Shepard
670e8b149f
[C++] Support attributes on class and union and improve formatting
2022-03-10 22:03:42 -08:00
Adam Turner
f05a068be9
Fix whitespace
2022-03-07 15:17:45 +00:00
Takeshi KOMIYA
f7a0107ddb
Merge branch '4.x'
2022-03-03 02:28:07 +09:00
Takeshi KOMIYA
37e8967f3f
Merge branch '4.4.x' into 4.x
2022-03-03 02:24:53 +09:00
Takeshi KOMIYA
12104fe5de
test: Follow the new behavior of typing.get_type_hints() since py311
...
Since python-3.11, `typing.get_type_hints()` will not add Optional[t] to
type annotations even if a default value for function argument is None.
refs: https://github.com/python/cpython/pull/30304 (bpo-46195)
2022-03-03 01:34:21 +09:00
Adam Turner
5775912455
Collapse single line docstrings
2022-02-20 03:13:45 +00:00
Adam Turner
6bb7b891a1
Remove copyright and licence fields
2022-02-20 03:06:23 +00:00
Adam Turner
b691ebcc3e
Conform to PEP 257 summary line conventions
2022-02-20 02:57:02 +00:00
Adam Turner
5694e0ce60
Fix module docstring indentation
2022-02-20 00:35:13 +00:00
Adam Turner
4f5a3269a6
Fix module docstring first line
2022-02-20 00:11:08 +00:00
Adam Turner
6b8bccec59
Remove module titles in docstrings
2022-02-19 23:17:29 +00:00
Takeshi KOMIYA
f72cd83e4d
Merge branch '4.x'
2022-02-19 16:08:05 +09:00
Jean Abou Samra
94d78d8747
Close #3985 : Implement #noqa for i18n
...
When cross-references in the original paragraph and the translated
paragraph do not match, a warning is emitted. It is useful, because
it allows to catch mistakes, but it can also be an annoyance since
sometimes it is expected that the cross-references will not match.
For example, a reference that is repeated in the original text may
need to be factored out for good style in the target language.
Another example: if the translator needs to translate a universally
understood term in the source language into a term that not everyone
knows is the translation of this original term, adding a reference to
the glossary can be warranted. This allows the translated message to
start with '#noqa' in order to disable the warning.
2022-02-15 19:51:06 +01:00
Takeshi KOMIYA
8b23f6db12
Merge commit '07110b7557a552ecfe702bdd6a2d2f9685cb1af9'
2022-02-14 03:03:40 +09:00
Takeshi KOMIYA
01d06f9ffe
Fix #10175 : LaTeX: named footnote ref is linked to an incorrect footnote
...
A named footnote reference will be converted to a hyperlink to an
incorrect footnote if the name is also used in the different document.
2022-02-13 20:20:42 +09:00
Takeshi KOMIYA
6f0a8f3516
Merge pull request #10189 from tk0miya/https_pep_role
...
The latest docutils converts :pep: role to the "https" URL (again)
2022-02-13 19:34:39 +09:00
Takeshi KOMIYA
9d29adb76c
The latest docutils converts :pep: role to the "https" URL (again)
...
docutils-0.19 (unreleased) generates "https" URL from :pep: role.
2022-02-13 19:22:17 +09:00
Takeshi KOMIYA
9ea2b768b0
Merge pull request #10185 from tk0miya/10181_napoleon_use_ivar_corrupted
...
Fix #10181 : napoleon_use_ivar adds unexpected prefix to vars
2022-02-13 18:46:14 +09:00
Takeshi KOMIYA
b07ca9dbcc
Merge pull request #10170 from tk0miya/https_pep_role
...
The latest docutils converts :pep: role to the "https" URL
2022-02-13 18:44:55 +09:00
Takeshi KOMIYA
8224f6f44a
Fix #10181 : napoleon_use_ivar adds unexpected prefix to vars
...
Since 4.0, :ivar: items has not been rendered as hyperlinks. So any
modules, classes and tilda are now harmful. This removes the prefixing
filter for napoleon_use_ivar option.
refs: #5129 and #5977
2022-02-12 00:50:56 +09:00
Takeshi KOMIYA
777b1fa105
Merge branch '4.x' into 9529_named_footnotes_in_latex
2022-02-11 13:08:26 +09:00
Takeshi KOMIYA
b6931acac6
Merge pull request #10168 from tk0miya/9529_testcase_for_named_footnote
...
test: Add testcase for named footnotes
2022-02-11 13:06:01 +09:00
Stephen Finucane
105c583f06
Revert "Close #9993 : std domain: Allow to refer an inline target via ref role"
...
This reverts commit e3ee8b378a
. This is a
breaking change that should not have been introduced in a minor release
(or arguably at all, given the impact).
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes : #10177
2022-02-08 16:00:01 +00:00
Takeshi KOMIYA
083b0b5207
The latest docutils converts :pep: role to the "https" URL
...
docutils-0.19 (unreleased) generates "https" URL from :pep: role.
2022-02-06 23:10:25 +09:00
Takeshi KOMIYA
680417a10d
Merge pull request #10150 from tk0miya/10146_autodoc_default_options_should_support_no-value
...
Close #10146 : autodoc: autodoc_default_options does not support `no-value` option
2022-02-06 15:59:24 +09:00
Takeshi KOMIYA
1546b21f89
Fix #9529 : LaTeX: named footnotes are converted to "?"
...
Named auto numbered footnote (ex. ``[#named]``) that is referred
multiple times was rendered to a question mark.
This calls `\sphinxstepexplicit` for every footnote node that is
referred multiple times.
2022-02-06 15:59:01 +09:00
Takeshi KOMIYA
9b142f15e6
test: Add testcase for named footnotes
2022-02-06 14:33:29 +09:00
Takeshi KOMIYA
8c1671bd35
Merge pull request #10094 from tk0miya/9777_new_html_structure_of_du18
...
test: Follow the new HTML structure of docutils-0.18
2022-02-05 21:25:03 +09:00
Adam Turner
3b01fbe2ad
Drop JavaScript Frameworks ( #10028 )
...
* Delete jQuery and underscore.js
* Move underscores.js setup to searchtools.js
* Update jQuery.url(en|de)code
* Update jQuery.getQueryParameters
* Firefox bug is no longer present
xref https://bugzilla.mozilla.org/show_bug.cgi?id=645075#c49
* Update jQuery.fn.highlightText
* Use enum instead of magic number
* Update test descriptions to remove obsolete jQuery reference
* Update Documentation.getCurrentURL
* Revert accidental fix of Documentation.getCurrentURL
* Update Documentation.initOnKeyListeners
* Update Documentation.hideSearchWords
* Update Documentation.highlightSearchWords
* Update Documentation.initDomainIndexTable
* Use arrow functions and const
* Replace $(document).ready
* Strict mode
* Move Documentation.hideSearchWords next to Documentation.highlightSearchWords
* Update translation functions in Documentation
* Replace $(document).ready in searchtools.js
* Update Scorer
* Update Search.hasIndex, Search.deferQuery, Search.stopPulse
* Prefer window.location
* Update Search.init
* Update Search.loadIndex
* Update Search.setIndex
* Update Search.startPulse
* Add _escapeRegExp
* Update Search.makeSearchSummary
* Update Search.htmlToText
* Update Search.performSearch
* Factor out _displayNextItem
* Update Search.query
* Update Search.performObjectSearch
* Update Search.performTermsSearch
* Remove underscores.js setup
* Use Sets
* Update test configuration
* Fix test failures
* Drop unused make/get URL functions
* Strict mode in searchtools.js
* Remove outmoded check for jQuery and underscore.js
* Ran prettier
prettier --print-width 120 --no-semi --quote-props as-needed --no-bracket-spacing --arrow-parens avoid --write sphinx/themes/basic/static
* Remove more references to jQuery and underscore.js
* Remove jQuery and underscore.js licences
* Update classic theme for no jQuery
* Update all other themes for no jQuery
* Restore jQuery & underscores.js to Sphinx themes
Enables a more gradual deprecation
* Added deprecation note to CHANGES
* Run prettier with defaults
* Update deprecation message to include extensions, note that sources must be copied
* oops
* Address Pradyun's feedback
* Forgot this one
* `let` doesn't work, as it is scoped to the block...
* Remove missed jQuery in sphinx13 theme
2022-01-30 20:27:12 +01:00
Takeshi KOMIYA
b0b51cecc2
Close #10146 : autodoc: autodoc_default_options does not support no-value
option
2022-01-31 01:51:37 +09:00
Takeshi KOMIYA
c75e43a321
Merge pull request #10136 from tk0miya/10133_autodoc_mocked_module
...
Fix #10133 : autodoc: Crashed when mocked module is used for type annotation
2022-01-30 23:35:54 +09:00
Takeshi KOMIYA
444e27865d
Fix #10133 : autodoc: Crashed when mocked module is used for type annotation
2022-01-30 23:19:55 +09:00
Takeshi KOMIYA
d8a398bbdd
Close #10125 : extlinks: Improve suggestion message for a reference having title
2022-01-23 20:09:47 +09:00
Takeshi KOMIYA
444dfc50aa
Merge branch '4.x'
2022-01-17 00:22:09 +09:00
Jakob Lykke Andersen
c11b109d59
intersphinx role: :external+inv:**: instead of :external:inv+**:
2022-01-16 09:48:11 +01:00
Jakob Lykke Andersen
ccc4f95b42
intersphinx role, hax role name to preserve case
2022-01-16 09:48:06 +01:00
Jakob Lykke Andersen
029d0e5b18
intersphinx role: new inventory parsing from role name
2022-01-16 09:48:06 +01:00
Jakob Lykke Andersen
ce5512e3af
intersphinx role, implement warning scheme
...
and temporarily remove explicit inventories
2022-01-16 09:48:06 +01:00
Jakob Lykke Andersen
184fd6a4aa
intersphinx role, update based on merged refactoring
2022-01-16 09:48:06 +01:00
Jakob Lykke Andersen
36c6eafdf1
intersphinx: explicitly parse out inventory specification
2022-01-16 09:48:06 +01:00
Jakob Lykke Andersen
69fa5260fc
intersphinx role: rename to 'external'
2022-01-16 09:47:54 +01:00
Jakob Lykke Andersen
8605644e83
intersphinx: more role testing
2022-01-16 09:47:54 +01:00
Takeshi KOMIYA
35dcc60a7c
intersphinx: Add :intersphinx:***: role
2022-01-16 09:47:53 +01:00
Takeshi KOMIYA
d82d370739
Merge pull request #10078 from danieleades/refactor/unused-loop-control-variables
...
address some unused loop control variables
2022-01-16 02:46:32 +09:00
Takeshi KOMIYA
3b8387f469
Merge pull request #10097 from tk0miya/10029_strip_value_from_cmdoption
...
Fix #9981 : std domain: Strip value part of the option directive from genindex
2022-01-16 02:44:24 +09:00