Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#226)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Apr 12, 2022
1 parent def37f7 commit 13ca2b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -12,7 +12,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
rev: v2.32.0
hooks:
- id: pyupgrade
args: [ "--py37-plus" ]
Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

## 1.16.0

- Add support for type subscriptions with multiple elements, where one or more elements
are tuples; e.g., `nptyping.NDArray[(Any, ...), nptyping.Float]`
- Add support for type subscriptions with multiple elements, where one or more elements are tuples; e.g.,
`nptyping.NDArray[(Any, ...), nptyping.Float]`
- Fix bug for arbitrary types accepting singleton subscriptions; e.g., `nptyping.Float[64]`
- Resolve forward references
- Expand and better handle `TypeVar`
Expand All @@ -29,7 +29,8 @@ are tuples; e.g., `nptyping.NDArray[(Any, ...), nptyping.Float]`
## 1.15.2

- Log a warning instead of crashing when a type guard import fails to resolve
- When resolving type guard imports if the target module does not have source code (such is the case for C-extension modules) do nothing instead of crashing
- When resolving type guard imports if the target module does not have source code (such is the case for C-extension
modules) do nothing instead of crashing

## 1.15.1

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ The following configuration options are accepted:
`True`, add stub documentation for undocumented parameters to be able to add type info.
- `typehints_document_rtype` (default: `True`): If `False`, never add an `:rtype:` directive. If `True`, add the
`:rtype:` directive if no existing `:rtype:` is found.
- `typehints_use_rtype` (default: `True`):
Controls behavior when `typehints_document_rtype` is set to `True`.
If `True`, document return type in the `:rtype:` directive.
If `False`, document return type as part of the `:return:` directive, if present, otherwise fall back to using `:rtype:`.
Use in conjunction with [napoleon_use_rtype](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_use_rtype) to avoid generation of duplicate or redundant return type information.
- `typehints_use_rtype` (default: `True`): Controls behavior when `typehints_document_rtype` is set to `True`. If
`True`, document return type in the `:rtype:` directive. If `False`, document return type as part of the `:return:`
directive, if present, otherwise fall back to using `:rtype:`. Use in conjunction with
[napoleon_use_rtype](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_use_rtype)
to avoid generation of duplicate or redundant return type information.
- `typehints_defaults` (default: `None`): If `None`, defaults are not added. Otherwise adds a default annotation:

- `'comma'` adds it after the type, changing Sphinx’ default look to “**param** (_int_, default: `1`) -- text”.
Expand Down

0 comments on commit 13ca2b4

Please sign in to comment.