Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update codebase #170

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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