From a345cc65045f2749038108909aa1fa2f943d444d Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 22 Apr 2024 20:27:11 -0700 Subject: [PATCH] python 3.9 compat --- pyproject.toml | 2 ++ src/numpydantic/ndarray.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 57bb695..865807f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,8 @@ select = [ ] ignore = [ "ANN101", "ANN102", "ANN401", "ANN204", + # explicit strict arg for zip + "B905", # builtin type annotations "UP006", "UP035", # | for Union types (only supported >=3.10 diff --git a/src/numpydantic/ndarray.py b/src/numpydantic/ndarray.py index f6aabd1..a5de7d3 100644 --- a/src/numpydantic/ndarray.py +++ b/src/numpydantic/ndarray.py @@ -44,7 +44,7 @@ def list_of_lists_schema(shape: Shape, array_type_handler: dict) -> ListSchema: shape_labels = reversed(split_parts) shape_args = reversed(shape.prepared_args) list_schema = None - for arg, label in zip(shape_args, shape_labels, strict=False): + for arg, label in zip(shape_args, shape_labels): # which handler to use? for the first we use the actual type # handler, everywhere else we use the prior list handler inner_schema = array_type_handler if list_schema is None else list_schema