Skip to content

Commit 6bd0d3b

Browse files
committed
fix up pre-commit by dropping 3.9 check for mypy
1 parent ae22f81 commit 6bd0d3b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ repos:
5555
- repo: https://github.com/pre-commit/mirrors-mypy
5656
rev: v1.13.0
5757
# check the oldest and newest supported Pythons
58+
# except skip python 3.9 for numpy, due to poor typing
5859
hooks:
5960
- &mypy
6061
id: mypy
61-
name: mypy with Python 3.9
62+
name: mypy with Python 3.10
6263
files: src
6364
additional_dependencies:
6465
['numpy', 'types-tqdm', 'click', 'types-jsonpatch', 'types-pyyaml', 'types-jsonschema', 'importlib_metadata', 'packaging']
65-
args: ["--python-version=3.9"]
66+
args: ["--python-version=3.10"]
6667
- <<: *mypy
6768
name: mypy with Python 3.12
6869
args: ["--python-version=3.12"]

src/pyhf/tensor/numpy_backend.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ def tolist(
203203
self, tensor_in: Tensor[T] | list[T]
204204
) -> int | float | complex | list[T] | list[Any]:
205205
try:
206-
# unused-ignore for [no-any-return] in python 3.9
207-
return tensor_in.tolist() # type: ignore[union-attr,no-any-return,unused-ignore]
206+
return tensor_in.tolist() # type: ignore[union-attr]
208207
except AttributeError:
209208
if isinstance(tensor_in, list):
210209
return tensor_in

0 commit comments

Comments
 (0)