Skip to content

Commit

Permalink
fix: Blacken.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-oakley committed Jun 15, 2024
1 parent 1731146 commit 896435b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions openapi_pydantic/v3/v3_0_3/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions openapi_pydantic/v3/v3_0_3/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def get_mode(

if TYPE_CHECKING:

class GenerateOpenAPI30Schema:
...
class GenerateOpenAPI30Schema: ...

elif PYDANTIC_V2:
from enum import Enum
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions openapi_pydantic/v3/v3_1_0/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/util/test_optional_and_computed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/v3_0_3/test_optional_and_computed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 896435b

Please sign in to comment.