From e1af1ef762d82e03621ba89032cb316d29cda7b0 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Wed, 1 May 2024 22:38:28 -0400 Subject: [PATCH] fix mypy typings using sequence instead of list --- stac_model/input.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stac_model/input.py b/stac_model/input.py index 658b2f2..22788d7 100644 --- a/stac_model/input.py +++ b/stac_model/input.py @@ -1,4 +1,4 @@ -from typing import Annotated, Any, List, Literal, Optional, TypeAlias, Union +from typing import Annotated, Any, List, Literal, Optional, Sequence, TypeAlias, Union from typing_extensions import Self from pydantic import Field, model_validator @@ -88,7 +88,7 @@ def validate_expression(self) -> Self: class ModelInput(MLMBaseModel): name: str # order is critical here (same index as dim shape), allow duplicate if the model needs it somehow - bands: List[Union[str, ModelBand]] = Field( + bands: Sequence[Union[str, ModelBand]] = Field( description=( "List of bands that compose the input. " "If a string is used, it is implied to correspond to a named-band. "