Skip to content

Commit

Permalink
Fix for new nptyping (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Jun 10, 2022
1 parent 7ee3891 commit bf27bef
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.18.3

- Support and require `nptyping>=2.1.2`

## 1.18.2

- Support and require `nptyping>=2.1.1`
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ testing =
covdefaults>=2.2
coverage>=6.3
diff-cover>=6.4
nptyping>=2.1.1
nptyping>=2.1.2
pytest>=7.1
pytest-cov>=3
sphobjinv>=2
Expand Down
12 changes: 6 additions & 6 deletions tests/test_sphinx_autodoc_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,39 +241,39 @@ def test_parse_annotation(annotation: Any, module: str, class_name: str, args: t
# Internal tuple with following additional type cannot be flattened (specific to nptyping?)
# These cases will fail if nptyping restructures its internal module hierarchy
(
nptyping.NDArray[nptyping.Shape["*"], nptyping.Float], # type: ignore # nptyping/issues/77
nptyping.NDArray[nptyping.Shape["*"], nptyping.Float],
(
":py:class:`~nptyping.base_meta_classes.NDArray`\\[:py:class:`~nptyping.base_meta_classes.Shape`\\[*], "
":py:class:`~numpy.float64`]"
),
),
(
nptyping.NDArray[nptyping.Shape["64"], nptyping.Float], # type: ignore # nptyping/issues/77
nptyping.NDArray[nptyping.Shape["64"], nptyping.Float],
(
":py:class:`~nptyping.base_meta_classes.NDArray`\\[:py:class:`~nptyping.base_meta_classes.Shape`\\[64],"
" :py:class:`~numpy.float64`]"
),
),
(
nptyping.NDArray[nptyping.Shape["*, *"], nptyping.Float], # type: ignore # nptyping/issues/77
nptyping.NDArray[nptyping.Shape["*, *"], nptyping.Float],
(
":py:class:`~nptyping.base_meta_classes.NDArray`\\[:py:class:`~nptyping.base_meta_classes.Shape`\\[*, "
"*], :py:class:`~numpy.float64`]"
),
),
(
nptyping.NDArray[nptyping.Shape["*, ..."], nptyping.Float], # type: ignore # nptyping/issues/77
nptyping.NDArray[nptyping.Shape["*, ..."], nptyping.Float],
(":py:class:`~nptyping.base_meta_classes.NDArray`\\[:py:data:`~typing.Any`, :py:class:`~numpy.float64`]"),
),
(
nptyping.NDArray[nptyping.Shape["*, 3"], nptyping.Float], # type: ignore # nptyping/issues/77
nptyping.NDArray[nptyping.Shape["*, 3"], nptyping.Float],
(
":py:class:`~nptyping.base_meta_classes.NDArray`\\[:py:class:`~nptyping.base_meta_classes.Shape`\\[*, 3"
"], :py:class:`~numpy.float64`]"
),
),
(
nptyping.NDArray[nptyping.Shape["3, ..."], nptyping.Float], # type: ignore # nptyping/issues/77
nptyping.NDArray[nptyping.Shape["3, ..."], nptyping.Float],
(
":py:class:`~nptyping.base_meta_classes.NDArray`\\[:py:class:`~nptyping.base_meta_classes.Shape`\\[3, "
"...], :py:class:`~numpy.float64`]"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ description = run type check on code base
setenv =
{tty:MYPY_FORCE_COLOR = 1}
deps =
mypy==0.960
mypy==0.961
types-docutils
commands =
mypy --python-version 3.10 src
Expand Down

0 comments on commit bf27bef

Please sign in to comment.