diff --git a/tests/integrations/pydantic/test_pydantic_data_quality.py b/tests/integrations/pydantic/test_pydantic_data_quality.py index 219ea664a..426e6c01a 100644 --- a/tests/integrations/pydantic/test_pydantic_data_quality.py +++ b/tests/integrations/pydantic/test_pydantic_data_quality.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Dict, List import pytest from pydantic import BaseModel, ValidationError @@ -23,7 +23,7 @@ class DummyModel(BaseModel): value: float @check_output(model=DummyModel, importance="warn") - def dummy() -> dict[str, float]: + def dummy() -> Dict[str, float]: return {"value": 15.0} node = Node.from_fn(dummy) @@ -49,7 +49,7 @@ class DummyModel(BaseModel): value: float @check_output(model=DummyModel, importance="warn") - def dummy() -> dict[str, float]: + def dummy() -> Dict[str, float]: return {"value": "fifteen"} # type: ignore node = Node.from_fn(dummy) @@ -80,7 +80,7 @@ class Version(BaseModel): class Repo(BaseModel): name: str owner: Owner - versions: list[Version] + versions: List[Version] data = { "name": "hamilton", @@ -104,7 +104,7 @@ class Version(BaseModel): class Repo(BaseModel): name: str owner: Owner - versions: list[Version] + versions: List[Version] data = { "name": "hamilton", @@ -128,10 +128,10 @@ class Version(BaseModel): class Repo(BaseModel): name: str owner: Owner - versions: list[Version] + versions: List[Version] @check_output(model=Repo, importance="warn") - def dummy() -> dict[str, Any]: + def dummy() -> Dict[str, Any]: return { "name": "hamilton", "owner": {"name": "DAGWorks-Inc"}, @@ -157,10 +157,10 @@ class Version(BaseModel): class Repo(BaseModel): name: str owner: Owner - versions: list[Version] + versions: List[Version] @check_output(model=Repo, importance="warn") - def dummy() -> dict[str, Any]: + def dummy() -> Dict[str, Any]: return { "name": "hamilton", "owner": {"name": "DAGWorks-Inc"}, @@ -221,7 +221,7 @@ class Version(BaseModel): class Repo(BaseModel): name: str owner: Owner - versions: list[Version] + versions: List[Version] def dummy() -> Repo: return Repo( @@ -249,7 +249,7 @@ class Version(BaseModel): class Repo(BaseModel): name: str owner: Owner - versions: list[Version] + versions: List[Version] def dummy() -> Repo: return Repo(