python 3.9 compat

This commit is contained in:
sneakers-the-rat 2024-04-22 20:27:11 -07:00
parent fbc7d2914b
commit a345cc6504
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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