Commit Graph
148 Commits
Author SHA1 Message Date
Adam Turner 1cfb68d8be Consistently name the object description options (#11533)
*  The directive option ``:noindex:`` was renamed to ``:no-index:``.
*  The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
*  The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.

The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
2023-07-28 22:30:26 +01:00
Adam Turner 13442f6901 Fix pytest style issues 2023-02-18 02:16:50 +00:00
Adam Turner dc1a519a1d Avoid `unittest.TestCase` methods 2023-02-18 02:05:14 +00:00
Adam Turner c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00:00
Adam Turner a13cf2c24d Adopt `profile = "black" for isort`
This allows using Ruff's import sorting fixers
2023-01-07 18:31:15 +00:00
Adam Turner 4032070e81 Run pyupgrade (#11070) 2023-01-02 00:01:14 +00:00
Daniel Eades 1abb24e309 remove blanket 'noqas' 2022-12-16 16:50:24 +01:00
ProGamerGovandAdam Turner b2fe07e1a1 Properly support of in docstring type specifiers (#10738)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-08-02 23:43:32 +01: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
Hugo van Kemenade 184fe83c73 Remove redundant code for Python < 3.6 2022-05-01 17:50:34 +03:00
Adam Turner f05a068be9 Fix whitespace 2022-03-07 15:17:45 +00:00
Adam Turner 6bb7b891a1 Remove copyright and licence fields 2022-02-20 03:06:23 +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 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 542db8ffb6 Merge pull request #10101 from Gobot1234/4.x
Fix empty returns section
2022-01-16 02:40:58 +09:00
James Hilton-Balfe ff2105a2f3 Update tests/test_ext_napoleon_docstring.py 2022-01-15 17:31:23 +00:00
James Hilton-Balfe d52adad64e Fix formatting 2022-01-15 14:04:38 +00:00
James Hilton-Balfe dc60b1db76 Add a test for this 2022-01-15 13:59:25 +00:00
Takeshi KOMIYA b84771dcd2 A happy new year! 2022-01-01 18:45:03 +09:00
Takeshi KOMIYA 502c4ee5fb Merge branch '3.x' 2021-01-24 14:32:13 +09:00
Takeshi KOMIYA 440e64a91b Fix #8004: napoleon_preprocess_types for Google style docstrings
Type definitions in Google style docstrings are rendered as references
when :confval:`napoleon_preprocess_types` enabled.
2021-01-23 14:20:19 +09:00
Takeshi KOMIYA 5ce72f465b Merge branch '3.x' 2021-01-22 22:52:32 +09:00
Takeshi KOMIYA 73db152cf6 Close #5560: napoleon_use_param also affect "other parameters" section 2021-01-20 23:21:11 +09:00
SolidifiedRay 7ad85cd1e0 Close #8573: napoleon: Add more custom section styles 2021-01-18 11:43:40 -08:00
Takeshi KOMIYA f996859420 A happy new year!
.. note::

   $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
   $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA f50b999911 Close #8236: napoleon: Support numpydoc's "Receives" section 2020-12-19 20:29:00 +09:00
Quentin Soubeyran c37ef640a7 rebased on upstream/3.x; fixed CI 2020-11-25 08:49:57 +01:00
Quentin Soubeyran ec62bf86fa implemented feature in numpy style, factored common code 2020-11-25 08:45:25 +01:00
Quentin Soubeyran ec30f77712 refactored code and tests, prepared for numpy feature 2020-11-25 08:45:25 +01:00
Quentin Soubeyran a60e1c10b7 sorted imports 2020-11-25 08:45:25 +01:00
Quentin Soubeyran 8995f15710 moved python 3.6+ syntax test data to standalone file 2020-11-25 08:45:25 +01:00
Quentin Soubeyran f268665292 added napoleon_google_attr_annotations option to use PEP 526 on google style 2020-11-25 08:45:25 +01:00
Takeshi KOMIYA 21a3bd4127 refactor: Fix flake8 violations under tests/ directory 2020-11-15 17:15:40 +09:00
François Freitag 0949735210 Sort imports with isort
Keep imports alphabetically sorted and their order homogeneous across
Python source files.

The isort project has more feature and is more active than the
flake8-import-order plugin.

Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
Takeshi KOMIYA 68c89f471c Merge pull request #8050 from keewis/preprocess-other-sections
Preprocess other sections
2020-10-30 01:54:34 +09:00
Takeshi KOMIYA 921f097906 Merge pull request #8051 from keewis/fix-see_also
use the obj role for all See Also items
2020-10-30 00:49:59 +09:00
Keewis 439f75afd2 enable preprocessing in the tests 2020-08-18 16:01:52 +02:00
Keewis 3c24021972 Merge branch '3.x' into preprocess-other-sections 2020-08-18 15:47:53 +02:00
Keewis 1c388241b4 default to False and update the tests 2020-08-12 19:48:07 +02:00
Keewis 27c252ccba only preprocess if the preprocessor is enabled 2020-08-10 13:04:21 +02:00
Keewis b69c5119b5 Merge branch '3.x' into preprocess-other-sections 2020-08-07 16:56:00 +02:00
Takeshi KOMIYA a4996f9054 Fix #7780: napoleon: multiple params declaration was wrongly recognized
So far, napoleon converts multiple paramaters declrarations to single
paramaeter fields (`:param:` and `:type:`) unexpectedly.  As a result,
the output seems broken.

This converts it to multiple parameter fields (a pair of field for each
parameter declration) to build parameter successfully.

Note: The conversion rule is available only when napoleon_use_params=True.
2020-08-07 23:46:55 +09:00
Takeshi KOMIYA 99e65a59be napoleon: Fix a broken test (refs: #8049)
Fix a testcase that added just before #8049 merged.
2020-08-07 23:44:32 +09:00
Takeshi KOMIYA 62a6df8f3c Merge pull request #8049 from keewis/type-preprocessing-without-use_param
enable type preprocessing without use_param
2020-08-07 23:37:22 +09:00
Keewis 95c861facb always use :obj: instead of searching the inventory 2020-08-07 12:44:22 +02:00
Keewis 75602f290a make sure the roles are stripped from invalid names, too 2020-08-06 16:38:49 +02:00
Keewis 4428393403 translate the functions before attempting to find a matching role 2020-08-06 14:08:34 +02:00
Keewis 849d3c18a7 remove the syntax checks from the escape method and update the tests 2020-08-05 19:22:43 +02:00