Skip to content

Commit

Permalink
Update mypy version
Browse files Browse the repository at this point in the history
* Updte general_plain_validator_function
  • Loading branch information
tarsil committed Sep 26, 2023
1 parent 860035f commit 35c078e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions esmerald/datastructures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
GetJsonSchemaHandler as GetJsonSchemaHandler,
)
from pydantic.json_schema import JsonSchemaValue as JsonSchemaValue
from pydantic_core.core_schema import CoreSchema
from pydantic_core.core_schema import CoreSchema, PlainValidatorFunctionSchema
from pydantic_core.core_schema import (
general_plain_validator_function as general_plain_validator_function,
with_info_plain_validator_function as general_plain_validator_function,
)
from starlette.datastructures import URL as URL # noqa: F401
from starlette.datastructures import Address as Address # noqa: F401
Expand Down Expand Up @@ -78,7 +78,7 @@ def __get_pydantic_json_schema__(
def __get_pydantic_core_schema__(
cls, source: Type[Any], handler: Callable[[Any], CoreSchema]
) -> CoreSchema:
return general_plain_validator_function(cls._validate)
return cast(PlainValidatorFunctionSchema, general_plain_validator_function(cls._validate))


class Secret(StarletteSecret): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test = [
"pytest>=7.4.0,<8.0.0",
"pytest-cov>=4.1.0,<5.0.0",
"pytest-asyncio>=0.19.0",
"mypy>=1.4.1",
"mypy==1.5.1",
"flake8>=5.0.4",
"black== 23.7.0",
"isort>=5.0.6,<6.0.0",
Expand Down

0 comments on commit 35c078e

Please sign in to comment.