Commit Graph

1157 Commits

Author SHA1 Message Date
Adam Turner
63dea6172a Merge branch '5.x'
# Conflicts:
#	sphinx/locale/__init__.py
2022-09-30 16:15:24 +01:00
Martin Liska
29e6adab12 extend option directive syntax
One can cross-reference an option value: :option:`--module=foobar`.
2022-09-27 19:02:45 +01:00
Adam Turner
4660b62de0 Drop Python 3.7 2022-09-27 18:31:47 +01:00
Adam Turner
8db24515ea Clear record_dependencies for each document (#10855) 2022-09-24 00:31:26 +01:00
Adam Turner
f57177de89 Add contents entries for domain objects (#10807)
- Add entries in the table of contents for domain objects (e.g. 
  `py:function`, `rst:role`, etc). Supported domains are Javascript,
  Python, and reStructuredText.
- Support content in `py:module` and `js:module` directives.
- Add the `noindexentry` and `noindex` flags to more domains.
- Add `toc_object_entries_show_parents` configuration setting
- Update documentation and tests
2022-09-13 20:20:02 +01:00
Brecht Machiels
d924acfdb9 Make toctree accept special docnames (#10673)
The `.. toctree::` directive now supports the reserved special docnames
'genindex', 'modindex', and 'search'.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-09-12 20:13:14 +01:00
danieleades
12bff8a273 Remove unneeded noqa lint suppression comments (#10772) 2022-08-28 20:03:17 +01:00
n-peugnet
1553cc3b36 linkcheck: Check the source URL of raw directives
Add raw directives' source URL to the list of links to check with linkcheck.
By the way, refactor HyperlinkCollector by adding `add_uri` function.
Add test for linkcheck raw directives source URL
2022-08-17 14:57:58 +02:00
Takeshi KOMIYA
e7fc03bce2 Allow specifying multiple CSS files in themes (#10465)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-07-17 12:27:43 +01:00
Joachim Jablon
663a5b7781 py domain: Ignore aliases for resolving :any: cross-references (#10089)
Co-authored-by: Joachim Jablon <joachim.jablon@people-doc.com>
2022-06-26 13:04:15 +01:00
Martin Liška
f789148fa2 Allow emphasising placeholders in option directives (#10366)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-16 20:46:01 +01:00
Takeshi KOMIYA
29edce9243 test: Add testcase for autodoc_inherit_docstring and attributes (refs: #10539) 2022-06-14 02:49:07 +09:00
Takeshi KOMIYA
ab58bbaed7 Merge pull request #10502 from AA-Turner/ifconfig-fix
`ifconfig`: Add a meta node to fix iteration
2022-06-03 02:15:50 +09:00
Adam Turner
91f90a5fb5 Fix test 2022-06-01 00:50:41 +01:00
Adam Turner
23a4b61415 Add a test 2022-06-01 00:35:28 +01:00
Adam Turner
9fad9d98c2 Fix fake link in test 2022-05-31 17:15:19 +01:00
Adam Turner
d066d23067 Add a test 2022-05-31 17:14:01 +01:00
Takeshi KOMIYA
a904ab563a test: Change URL of testcase 2022-05-30 02:06:30 +09:00
Anselm Kruis
336885c4e2 Add test cases for #8180
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.
2022-05-23 02:04:03 +09:00
Takeshi KOMIYA
06a9139308 Fix #9648: autodoc: *args and **kwargs entries are duplicated
In basic usage of autodoc (docstring), `args` and `kwargs` arguments
are marked up without stars.  But numpydoc style recommends to mark
them up with stars.

This adds support for starred arguments in docstrings to
`autodoc_typehints` feature.
2022-05-15 23:06:49 +09:00
Takeshi KOMIYA
92fcac321b test: Add *args and **kwargs to testcase of target.typehints 2022-05-15 19:05:17 +09:00
Takeshi KOMIYA
e770e2567f Merge pull request #10427 from tk0miya/10421_autodoc_preserve_defaults_for_classmethod
Fix #10421: autodoc_preserve_defaults doesn't work on class methods
2022-05-08 23:19:10 +09:00
Takeshi KOMIYA
10dd5a0e43 Fix #10421: autodoc_preserve_defaults doesn't work on class methods 2022-05-08 22:59:14 +09:00
Takeshi KOMIYA
7134317e49 Merge remote-tracking branch 'origin/5.x' into HEAD 2022-05-07 22:37:58 +09:00
Takeshi KOMIYA
06e5c036b7 Fix an isort warning 2022-05-07 22:20:43 +09:00
Takeshi KOMIYA
5344b1b241 Merge branch '5.x' into 10258_autosummary 2022-05-07 21:27:47 +09:00
Takeshi KOMIYA
425a3e6c09 Merge branch '4.x' into 5.x 2022-05-06 03:32:43 +09:00
Takeshi KOMIYA
3805e0646f Merge pull request #10251 from jbms/fix-inline-syntax-highlight
Make code role highlighting consistent with code-block directive
2022-05-06 02:54:42 +09:00
Takeshi KOMIYA
96b15e9e66 Merge pull request #10353 from tk0miya/10305_optional_forwardref_annotations
Fix #10305: autodoc: Failed to extract optional forwardrefs
2022-05-03 02:03:28 +09:00
Adam Turner
971040b4b7 Merge branch '5.x' into fix-warnings
# Conflicts:
#	tests/test_search.py
2022-05-02 17:05:42 +01:00
Adam Turner
bde47ce679 Add test for duplicated submodules in sphinx.ext.apidoc 2022-05-01 06:12:25 +01:00
Adam Turner
55669f6cfc Specify encoding 2022-04-22 04:21:12 +01: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
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
James Parkhurst
88b213bbf0 Added test case 2022-04-04 11:45:58 +01: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
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
f5e4e70817 Fix #10266: autodoc_preserve_defaults crashes on kwonlyargs w/o defaults 2022-04-02 16:55:48 +09:00
Takeshi KOMIYA
223b1a94f2 Merge branch '4.x' 2022-03-28 01:00:37 +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
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
Takeshi KOMIYA
aa1bc83c2a Merge branch '4.x' 2022-03-19 22:58:15 +09: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
Adam Turner
4f5a3269a6 Fix module docstring first line 2022-02-20 00:11:08 +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