-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preprocessing numpy types #7690
Merged
tk0miya
merged 51 commits into
sphinx-doc:3.x
from
keewis:transform_numpy_parameter_types
Jul 25, 2020
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
a7bbedf
add a test for the parameter type conversions
keewis b1f43d2
use textwrap for a normal indentation depth
keewis bc25a3d
try to mark literals as such
keewis bafb24d
actually apply the type conversion
keewis bdea34e
don't treat instance as special
keewis bd33b61
update the translations
keewis 70363c3
flake8
keewis e982213
more flake8
keewis ace9331
move the numpy type spec parsing function out of NumpyDocstring
keewis 8ab210f
don't use the obj role if it is not necessary
keewis 25937f7
move tokenize_type_spec to its own function and add tests for it
keewis fc70205
get the type converter function to work, verified by new tests
keewis 2882c34
fix the expected parameters section to match the current status
keewis ad89b1f
replace the hard-coded mapping of translations with a config option
keewis e1d7eda
rename the configuration option
keewis 27733d6
replace the custom role with markup
keewis b846db7
emit a warning instead of raising an error
keewis ce60b55
properly use sphinx's logger
keewis eab4912
update the splitting regexp to handle braces in strings and escaped q…
keewis 9835f1f
test that braces and quotes in strings work
keewis 9bfbe25
set a default so translations don't to be specified
keewis e3b7e16
move the regexes to top-level
keewis 20e3600
treat value sets as literals
keewis dc8c7ac
update the integration test
keewis af6071e
expect a warning instead of an error
keewis b0da0e5
remove the default for the default translation
keewis 37e0251
make invalid value sets a literal to avoid further warnings
keewis 866c822
move the warnings to token_type
keewis d177e58
reimplement the value set combination function using collections.deque
keewis 1140f7b
also check type specs without actual types
keewis 26855f9
also test invalid string tokens
keewis 4d0b4f2
add back the trailing whitespace
keewis fedceb2
move the binary operator "or" to before the newline
keewis 7d8aaf2
remove a debug print
keewis f4817be
use the format method instead of f-strings
keewis 804df88
use :class: as default role and only fall back to :obj: for singletons
keewis f30c0cb
rewrite the invalid token_type test to check the warnings
keewis 4fc22cd
use the dedent function imported at module-level
keewis fc43f49
add back the trailing whitespace
keewis 2b981b6
make sure singletons actually use :obj:
keewis 922054e
replace .format with %-style string interpolation
keewis 660b818
add type hints and location information
keewis cc8baf6
only transform the types if napoleon_use_param is true
keewis 274d9fe
don't try to generate test cases in code
keewis 9b42560
support pandas-style default spec by postprocessing tokens
keewis ae35f81
allow mapping to a long name
keewis 9200484
don't provide a empty line number
keewis 530793d
update the link to the official docstring guide
keewis 8feb5f9
mention that the type aliases only work with napoleon_use_param
keewis 6ae1c60
add a section about napoleon_type_aliases to the documentation
keewis 864dd0b
add a comment about default not being a official keyword
keewis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. versionadded:: 3.2
tag is needed at the end of description.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update this after merging.