From 27096ba9a9e7e5223863e03f1b794116d002764d Mon Sep 17 00:00:00 2001 From: tarsil Date: Mon, 27 Nov 2023 09:41:24 +0000 Subject: [PATCH] Update requirements --- esmerald/params.py | 15 --------------- esmerald/utils/sync.py | 2 +- pyproject.toml | 4 ++-- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/esmerald/params.py b/esmerald/params.py index e0c96c06..259ca5fd 100644 --- a/esmerald/params.py +++ b/esmerald/params.py @@ -31,7 +31,6 @@ def __init__( required: bool = True, title: Optional[str] = None, description: Optional[str] = None, - const: Optional[bool] = None, gt: Optional[float] = None, ge: Optional[float] = None, lt: Optional[float] = None, @@ -56,7 +55,6 @@ def __init__( self.deprecated = deprecated self.examples = examples self.include_in_schema = include_in_schema - self.const = const self.allow_none = allow_none extra: Dict[str, Any] = {} @@ -70,7 +68,6 @@ def __init__( extra.update(examples=self.examples) extra.update(deprecated=self.deprecated) extra.update(include_in_schema=self.include_in_schema) - extra.update(const=self.const) extra.update(allow_none=self.allow_none) super().__init__( @@ -81,7 +78,6 @@ def __init__( alias_priority=alias_priority, title=title, description=description, - const=const, gt=gt, ge=ge, lt=lt, @@ -93,7 +89,6 @@ def __init__( examples=examples, allow_inf_nan=allow_inf_nan, json_schema_extra=extra, - include=include_in_schema, validate_default=validate_default, validation_alias=validation_alias, discriminator=discriminator, @@ -126,7 +121,6 @@ def __init__( required: bool = True, title: Optional[str] = None, description: Optional[str] = None, - const: Optional[bool] = None, gt: Optional[float] = None, ge: Optional[float] = None, lt: Optional[float] = None, @@ -158,7 +152,6 @@ def __init__( alias_priority=alias_priority, title=title, description=description, - const=const, gt=gt, ge=ge, lt=lt, @@ -203,7 +196,6 @@ def __init__( required: bool = True, title: Optional[str] = None, description: Optional[str] = None, - const: Optional[bool] = None, gt: Optional[float] = None, ge: Optional[float] = None, lt: Optional[float] = None, @@ -235,7 +227,6 @@ def __init__( alias_priority=alias_priority, title=title, description=description, - const=const, gt=gt, ge=ge, lt=lt, @@ -280,7 +271,6 @@ def __init__( required: bool = True, title: Optional[str] = None, description: Optional[str] = None, - const: Optional[bool] = None, gt: Optional[float] = None, ge: Optional[float] = None, lt: Optional[float] = None, @@ -312,7 +302,6 @@ def __init__( alias_priority=alias_priority, title=title, description=description, - const=const, gt=gt, ge=ge, lt=lt, @@ -354,7 +343,6 @@ def __init__( required: bool = True, title: Optional[str] = None, description: Optional[str] = None, - const: Optional[bool] = None, gt: Optional[float] = None, ge: Optional[float] = None, lt: Optional[float] = None, @@ -381,7 +369,6 @@ def __init__( annotation=annotation, title=title, description=description, - const=const, gt=gt, ge=ge, lt=lt, @@ -420,7 +407,6 @@ def __init__( alias: Optional[str] = None, alias_priority: Optional[int] = _PyUndefined, description: Optional[str] = None, - const: Optional[bool] = None, embed: Optional[bool] = None, gt: Optional[float] = None, ge: Optional[float] = None, @@ -462,7 +448,6 @@ def __init__( alias=alias, alias_priority=alias_priority, description=description, - const=const, gt=gt, ge=ge, lt=lt, diff --git a/esmerald/utils/sync.py b/esmerald/utils/sync.py index 17b0b2f1..9500118e 100644 --- a/esmerald/utils/sync.py +++ b/esmerald/utils/sync.py @@ -21,7 +21,7 @@ def __init__(self, fn: Callable[P, T]): if is_async_callable(fn): self.fn = fn else: - self.fn = partial(run_sync, fn) # type:ignore[assignment] + self.fn = partial(run_sync, fn) async def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T: return await self.fn(*args, **kwargs) diff --git a/pyproject.toml b/pyproject.toml index 8ea5ab4c..06cfd3a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ dependencies = [ "itsdangerous>=2.1.2,<3.0.0", "jinja2>=3.1.2,<4.0.0", "loguru>=0.7.0,<0.8.0", - "pydantic>=2.5.1,<3.0.0", + "pydantic>=2.5.2,<3.0.0", "pydantic-settings>=2.0.0,<3.0.0", "python-multipart>=0.0.5,<0.0.7", "openapi-schemas-pydantic>=3.0.0", @@ -96,7 +96,7 @@ test = [ "pytest>=7.4.0,<8.0.0", "pytest-cov>=4.1.0,<5.0.0", "pytest-asyncio>=0.20.0", - "mypy==1.6.1", + "mypy==1.7.1", "flake8>=5.0.4", "black==23.11.0", "isort>=5.0.6,<6.0.0",