Skip to content

Commit

Permalink
fix missing type annotations fails - caused by dependabot update
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Šoltis <[email protected]>
  • Loading branch information
slimreaper35 authored and MartinBasti committed Jul 9, 2024
1 parent 2856d7d commit a1f8840
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/models/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class TestPackageInput:
],
)
def test_valid_packages(self, input_data: dict[str, Any], expect_data: dict[str, Any]) -> None:
adapter = pydantic.TypeAdapter(PackageInput)
adapter: pydantic.TypeAdapter[PackageInput] = pydantic.TypeAdapter(PackageInput)
package = cast(PackageInput, adapter.validate_python(input_data))
assert package.model_dump() == expect_data

Expand Down Expand Up @@ -167,7 +167,7 @@ def test_valid_packages(self, input_data: dict[str, Any], expect_data: dict[str,
)
def test_invalid_packages(self, input_data: dict[str, Any], expect_error: str) -> None:
with pytest.raises(pydantic.ValidationError, match=expect_error):
adapter = pydantic.TypeAdapter(PackageInput)
adapter: pydantic.TypeAdapter[PackageInput] = pydantic.TypeAdapter(PackageInput)
adapter.validate_python(input_data)


Expand Down

0 comments on commit a1f8840

Please sign in to comment.