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
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
Keewis
f30c0cb9f6
rewrite the invalid token_type test to check the warnings
2020-07-16 00:27:00 +02:00
Keewis
4d0b4f2931
add back the trailing whitespace
2020-07-16 00:26:11 +02:00
Keewis
26855f92d8
also test invalid string tokens
2020-07-16 00:26:10 +02:00
Keewis
1140f7b26d
also check type specs without actual types
2020-07-16 00:26:10 +02:00
Keewis
d177e58999
reimplement the value set combination function using collections.deque
2020-07-16 00:26:10 +02:00
Keewis
866c822e11
move the warnings to token_type
2020-07-16 00:26:10 +02:00
Keewis
af6071e571
expect a warning instead of an error
2020-07-16 00:26:10 +02:00
Keewis
dc8c7ac9f8
update the integration test
2020-07-16 00:26:10 +02:00
Keewis
9835f1fff8
test that braces and quotes in strings work
2020-07-16 00:26:09 +02:00
Keewis
2882c3465a
fix the expected parameters section to match the current status
2020-07-16 00:22:56 +02:00
Keewis
fc70205fb4
get the type converter function to work, verified by new tests
2020-07-16 00:22:56 +02:00
Keewis
25937f745a
move tokenize_type_spec to its own function and add tests for it
2020-07-16 00:22:56 +02:00
Keewis
b1f43d2fff
use textwrap for a normal indentation depth
2020-07-16 00:19:58 +02:00
Keewis
a7bbedfbb7
add a test for the parameter type conversions
2020-07-16 00:19:22 +02:00
Takeshi KOMIYA
eb8f3b539a
Revert "ext.napoleon: Emit type annotations at the start of .. attribute::
"
...
This reverts commit 9d7171899a
.
2020-06-13 16:28:58 +09:00
Takeshi KOMIYA
a28c9ad842
Fix #7734 : napoleon: overescaped trailing underscore on attribute
2020-05-28 01:47:33 +09:00
Takeshi KOMIYA
1c3179300a
Merge pull request #7583 from eric-wieser/fix-napoleon
...
ext.napoleon: Emit type annotations at the start of `.. attribute::`
2020-05-02 12:33:59 +09:00
Eric Wieser
453fe55dc9
ext.napoleon: Do not consume colons within inline code
...
Fixes gh-7581
2020-04-30 08:57:24 +01:00
Eric Wieser
9d7171899a
ext.napoleon: Emit type annotations at the start of .. attribute::
2020-04-29 19:03:24 +01:00
Takeshi KOMIYA
89dd4bf438
Fix #6240 : napoleon: Attributes and Methods sections ignore :noindex: option
2020-03-21 18:54:44 +09:00
Takeshi KOMIYA
b14439ca48
Fix #6999 : napoleon: fails to parse tilde in :exc: role
2020-01-09 00:15:27 +09:00
Takeshi KOMIYA
eaf495c3c4
A happy new year!
2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
c4dfc7402e
Fix #6436 : napoleon: "Unknown target name" error
2019-06-09 00:23:18 +09:00
Takeshi KOMIYA
8e356c3bf4
Fix #6220 , #6225 : napoleon: AttributeError is raised for raised section having references
2019-03-31 22:25:06 +09:00
Jon Dufresne
22afc77c48
Python-3-only clean ups discovered by pyupgrade
...
https://github.com/asottile/pyupgrade
> A tool to automatically upgrade syntax for newer versions of the
> language.
- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
2019-03-19 01:09:48 +09:00
Takeshi KOMIYA
65970a3033
Fix #6140 : Use unittest.mock instead of mock
2019-03-09 15:16:04 +09:00
Takeshi KOMIYA
76e9f57c2e
Merge branch '1.8'
2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75
A happy new year!
2019-01-02 16:00:30 +09:00
Jon Dufresne
bade33c7e4
Remove unnecessary encoding cookie from Python source files
...
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:
https://docs.python.org/3/howto/unicode.html#the-string-type
> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...
Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Rob Ruana
e547a6a0d2
Fixes #5426 : [Napoleon] Better handling of inline attributes ( #5470 )
...
* Fixes #5426 : [Napoleon] Better handling of inline attributes
* Removes uneeded NOQA comments
* Fixes imports
2018-09-23 09:26:17 -04:00
Antony Lee
dbb7c38220
Rendering of exceptions by napoleon. ( #4046 )
...
This lets napoleon render exceptions using the standard info field
syntax
```
:raises FooException: Some condition.
```
rather than the nonstandard
```
:raises: :exc:`FooException` -- Some condition.
```
Note that the previous approach was more forgiving if an explanatory
text was given in the Raises section without an actual exception class:
```
Raises
------
If something occurs.
```
would be rendered as
```
:raises: *If something occurs*
```
which is OK-ish but is now rendered as
```
:raises If something occurs.:
```
which is somewhat more nonsensical.
However neither the Google style guide nor numpydoc actually support
this form (they always have both the type and the description) so I
think the change is reasonable.
2018-09-23 08:31:27 -04:00
Takeshi KOMIYA
4073d4e850
Fix flake8 violations
2018-02-20 00:08:44 +09:00
Takeshi KOMIYA
938ba386ed
Merge branch '1.7'
2018-02-20 00:02:57 +09:00
Takeshi KOMIYA
f7027049b1
Fix flake8 violations
2018-02-19 23:20:56 +09:00
Patrick Wingo
e505cbb3be
Napoleon: custom section headers ( #4387 )
...
* Changes to allow for custom sections in google/numpy comments when parsing with napoleon
* fixed some formatting to pass flake8 tests
2018-02-15 16:16:23 -05:00
Martin Larralde
4d7c90d857
Implement missing napoleon admonitions
2018-02-13 18:02:02 +01:00
Rob Ruana
eb39f5714a
Merge pull request #4047 from AWhetter/fix_2979_2
...
Properties can have types documented with :type:
2018-02-03 17:42:49 -05:00
Takeshi KOMIYA
2426cedb8b
A happy new year!
2018-01-01 01:06:58 +09:00
Ashley Whetter
8797ff51b3
Properties can have types documented with :type:
2017-09-06 15:57:11 -07:00
Takeshi KOMIYA
8f9dd64992
Merge branch 'stable'
2017-03-26 11:52:15 +09:00