diff --git a/openapi_pydantic/v3/v3_0_3/schema.py b/openapi_pydantic/v3/v3_0_3/schema.py index 8d33603..e3f04ce 100644 --- a/openapi_pydantic/v3/v3_0_3/schema.py +++ b/openapi_pydantic/v3/v3_0_3/schema.py @@ -605,8 +605,7 @@ def schema_validate( strict: Optional[bool] = None, from_attributes: Optional[bool] = None, context: Optional[Dict[str, Any]] = None - ) -> Schema: - ... + ) -> Schema: ... elif PYDANTIC_V2: schema_validate = Schema.model_validate diff --git a/openapi_pydantic/v3/v3_0_3/util.py b/openapi_pydantic/v3/v3_0_3/util.py index d5a54eb..8e4174a 100644 --- a/openapi_pydantic/v3/v3_0_3/util.py +++ b/openapi_pydantic/v3/v3_0_3/util.py @@ -58,8 +58,7 @@ def get_mode( if TYPE_CHECKING: - class GenerateOpenAPI30Schema: - ... + class GenerateOpenAPI30Schema: ... elif PYDANTIC_V2: from enum import Enum @@ -111,8 +110,7 @@ def literal_schema(self, schema: core_schema.LiteralSchema) -> JsonSchemaValue: else: - class GenerateOpenAPI30Schema: - ... + class GenerateOpenAPI30Schema: ... def construct_open_api_with_schema_class( diff --git a/openapi_pydantic/v3/v3_1_0/schema.py b/openapi_pydantic/v3/v3_1_0/schema.py index 37d82ab..0d53e30 100644 --- a/openapi_pydantic/v3/v3_1_0/schema.py +++ b/openapi_pydantic/v3/v3_1_0/schema.py @@ -962,8 +962,7 @@ def schema_validate( strict: Optional[bool] = None, from_attributes: Optional[bool] = None, context: Optional[Dict[str, Any]] = None - ) -> Schema: - ... + ) -> Schema: ... elif PYDANTIC_V2: schema_validate = Schema.model_validate diff --git a/tests/util/test_optional_and_computed.py b/tests/util/test_optional_and_computed.py index cbcf3d3..d8b95f8 100644 --- a/tests/util/test_optional_and_computed.py +++ b/tests/util/test_optional_and_computed.py @@ -63,8 +63,7 @@ def construct_sample_api() -> OpenAPI: if TYPE_CHECKING: - def computed_field(x: Callable) -> Callable: - ... + def computed_field(x: Callable) -> Callable: ... else: from pydantic import computed_field diff --git a/tests/v3_0_3/test_optional_and_computed.py b/tests/v3_0_3/test_optional_and_computed.py index 76413cf..c9cbd98 100644 --- a/tests/v3_0_3/test_optional_and_computed.py +++ b/tests/v3_0_3/test_optional_and_computed.py @@ -66,8 +66,7 @@ def construct_sample_api() -> OpenAPI: if TYPE_CHECKING: - def computed_field(x: Callable) -> Callable: - ... + def computed_field(x: Callable) -> Callable: ... else: from pydantic import computed_field