From a9f158059b5e9b61db82f8f8a47369a22596a714 Mon Sep 17 00:00:00 2001 From: yu23ki14 Date: Wed, 2 Oct 2024 10:50:40 +0900 Subject: [PATCH] try to fix error --- common/birdxplorer_common/models.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/common/birdxplorer_common/models.py b/common/birdxplorer_common/models.py index d066f70..bc5532d 100644 --- a/common/birdxplorer_common/models.py +++ b/common/birdxplorer_common/models.py @@ -1,14 +1,25 @@ from abc import ABC, abstractmethod from datetime import datetime, timezone from enum import Enum -from typing import Any, Dict, List, Literal, Optional, Type, TypeAlias, TypeVar, Union +from typing import ( + Any, + Dict, + List, + Literal, + Optional, + Set, + Type, + TypeAlias, + TypeVar, + Union, +) from pydantic import BaseModel as PydanticBaseModel from pydantic import ConfigDict, GetCoreSchemaHandler, HttpUrl, TypeAdapter from pydantic.alias_generators import to_camel from pydantic_core import core_schema -IncEx: TypeAlias = "set[int] | set[str] | dict[int, IncEx] | dict[str, IncEx] | None" +IncEx: TypeAlias = Union[Set[int], Set[str], Dict[int, Any], Dict[str, Any], None] StrT = TypeVar("StrT", bound="BaseString") IntT = TypeVar("IntT", bound="BaseInt") FloatT = TypeVar("FloatT", bound="BaseFloat")