Commit Graph

122 Commits

Author SHA1 Message Date
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
Keewis
e697242451 fix the tests by falling back to a empty dict on AttributeError 2020-08-04 20:50:02 +02:00
Keewis
e9f9da5326 Merge branch '3.x' into preprocess-other-sections 2020-08-04 19:33:28 +02:00
Keewis
478ab44d7e Merge branch '3.x' into escape-combined-args-kwargs 2020-08-04 18:38:03 +02:00
Keewis
c812370427 expect the normal raises and yields to be preprocessed, too 2020-08-04 14:59:54 +02:00
Keewis
47da37e1d9 make sure strings are not split using other delimiters 2020-08-04 12:28:30 +02:00
Keewis
fbad78d08f check that a "default <obj>" notation works with xrefs 2020-08-04 12:21:00 +02:00
Keewis
2c75aaaa54 move the GoogleDocstring test to the appropriate test class 2020-08-04 11:36:15 +02:00
Keewis
278a057104 move the return types and yield types tests to above the raises test 2020-08-04 11:35:39 +02:00
Keewis
fa760c326a move the translations to a named variable 2020-08-04 11:30:14 +02:00
Keewis
697fc8b16c add test for the raises, yields and returns sections 2020-08-04 11:25:57 +02:00
Keewis
cac6d1787d preprocess even with napoleon_use_param = False 2020-08-04 10:43:31 +02:00
Keewis
6be806b3c8 check that floats and complex numbers are detected as literals 2020-08-01 14:20:04 +02:00
Keewis
92e9cd488c use a regex to decide whether to postprocess a token starting with default 2020-08-01 13:38:38 +02:00
Keewis
b353dfed7b properly link ... to Ellipsis 2020-07-31 17:44:04 +02:00
Keewis
31809b3041 add tests for referencing ellipsis objects 2020-07-29 22:30:02 +02:00
Keewis
e39c1a8d6a add more delimiters so describing mappings becomes possible 2020-07-29 22:29:03 +02:00
Keewis
05bf00bd4c make the postprocessing a bit more robust and add tests 2020-07-29 22:23:51 +02:00
Keewis
0e5964dad9 move the misplaced GoogleDocstring test to the appropriate test class 2020-07-29 02:34:17 +02:00
Keewis
58f84186e0 Merge branch '3.x' into escape-combined-args-kwargs 2020-07-25 15:15:06 +02:00
Keewis
ae35f81d3d allow mapping to a long name 2020-07-21 17:13:41 +02:00
Keewis
9b425606e7 support pandas-style default spec by postprocessing tokens 2020-07-21 12:26:28 +02:00
Keewis
274d9fe4f9 don't try to generate test cases in code 2020-07-16 00:27:00 +02:00
Keewis
660b818636 add type hints and location information 2020-07-16 00:27:00 +02:00
Keewis
2b981b6abd make sure singletons actually use :obj: 2020-07-16 00:27:00 +02:00
Keewis
fc43f494ac add back the trailing whitespace 2020-07-16 00:27:00 +02:00
Keewis
4fc22cd0c4 use the dedent function imported at module-level 2020-07-16 00:27:00 +02:00