Skip to content

Commit

Permalink
typing: fix recursive typing of main.IncEnx (pydantic#9924)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Jul 19, 2024
1 parent 7cfaeba commit cc90fb0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pydantic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
# (even when not type checking) via typing.get_type_hints.
ModelT = TypeVar('ModelT', bound='BaseModel')
TupleGenerator = Generator[Tuple[str, Any], None, None]
# should be `set[int] | set[str] | dict[int, IncEx] | dict[str, IncEx] | None`, but mypy can't cope
IncEx: TypeAlias = Union[Set[int], Set[str], Dict[int, Any], Dict[str, Any], None]
IncEx: TypeAlias = Union[Set[int], Set[str], Dict[int, 'IncEx'], Dict[str, 'IncEx'], None]


if TYPE_CHECKING:
Expand Down

0 comments on commit cc90fb0

Please sign in to comment.