Skip to content

Commit

Permalink
Fix style with fresh new black
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Jan 26, 2024
1 parent 3b12607 commit 6b3f50d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
6 changes: 2 additions & 4 deletions openapify/core/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,7 @@ def _determine_body_media_type(
@overload
def build_spec(
routes: Iterable[RouteDef], spec: apispec.APISpec
) -> apispec.APISpec:
...
) -> apispec.APISpec: ...


@overload
Expand All @@ -500,8 +499,7 @@ def build_spec(
servers: Optional[List[Union[str, openapi.Server]]] = None,
security_schemes: Optional[Mapping[str, openapi.SecurityScheme]] = None,
**options: Any,
) -> apispec.APISpec:
...
) -> apispec.APISpec: ...


def build_spec(
Expand Down
4 changes: 2 additions & 2 deletions openapify/core/openapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ class OAuth2SecurityScheme(SecurityScheme):
@dataclass
class OpenIDConnectSecurityScheme(SecurityScheme):
openIdConnectUrl: str = ""
type: Literal[
type: Literal[SecuritySchemeType.OPEN_ID_CONNECT] = (
SecuritySchemeType.OPEN_ID_CONNECT
] = SecuritySchemeType.OPEN_ID_CONNECT
)
description: Optional[str] = None


Expand Down
6 changes: 2 additions & 4 deletions openapify/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def request_schema(
] = None,
headers: Optional[Mapping[str, Union[str, Header]]] = None,
cookies: Optional[Mapping[str, Union[str, Cookie]]] = None,
) -> Callable[[Handler], Handler]:
...
) -> Callable[[Handler], Handler]: ...


@overload
Expand All @@ -54,8 +53,7 @@ def request_schema(
] = None,
headers: Optional[Mapping[str, Union[str, Header]]] = None,
cookies: Optional[Mapping[str, Union[str, Cookie]]] = None,
) -> Callable[[Handler], Handler]:
...
) -> Callable[[Handler], Handler]: ...


def request_schema( # type: ignore[misc]
Expand Down
14 changes: 6 additions & 8 deletions openapify/ext/web/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ def _complete_routes(routes: Iterable[RouteDef]) -> Iterable[RouteDef]:


@overload
def build_spec(app: Application, spec: Optional[APISpec] = None) -> APISpec:
...
def build_spec(
app: Application, spec: Optional[APISpec] = None
) -> APISpec: ...


@overload
def build_spec(
routes: Iterable[AioHttpRouteDef], spec: Optional[APISpec] = None
) -> APISpec:
...
) -> APISpec: ...


@overload
Expand All @@ -124,8 +124,7 @@ def build_spec(
Callable[[RouteDef], Union[RouteDef, None]]
] = None,
**options: Any,
) -> APISpec:
...
) -> APISpec: ...


@overload
Expand All @@ -140,8 +139,7 @@ def build_spec(
Callable[[RouteDef], Union[RouteDef, None]]
] = None,
**options: Any,
) -> APISpec:
...
) -> APISpec: ...


def build_spec( # type: ignore[misc]
Expand Down

0 comments on commit 6b3f50d

Please sign in to comment.