Skip to content

Commit

Permalink
馃帹 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Feb 13, 2023
1 parent 5778881 commit 9ba6772
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs_src/body_multiple_params/tutorial004.py
Expand Up @@ -25,7 +25,7 @@ async def update_item(
item: Item,
user: User,
importance: int = Body(gt=0),
q: Union[str, None] = None
q: Union[str, None] = None,
):
results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
if q:
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_multiple_params/tutorial004_py310.py
Expand Up @@ -23,7 +23,7 @@ async def update_item(
item: Item,
user: User,
importance: int = Body(gt=0),
q: str | None = None
q: str | None = None,
):
results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
if q:
Expand Down
2 changes: 1 addition & 1 deletion docs_src/path_params_numeric_validations/tutorial006.py
Expand Up @@ -8,7 +8,7 @@ async def read_items(
*,
item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
q: str,
size: float = Query(gt=0, lt=10.5)
size: float = Query(gt=0, lt=10.5),
):
results = {"item_id": item_id}
if q:
Expand Down
1 change: 0 additions & 1 deletion fastapi/routing.py
Expand Up @@ -1248,7 +1248,6 @@ def trace(
generate_unique_id
),
) -> Callable[[DecoratedCallable], DecoratedCallable]:

return self.api_route(
path=path,
response_model=response_model,
Expand Down
6 changes: 3 additions & 3 deletions fastapi/security/api_key.py
Expand Up @@ -18,7 +18,7 @@ def __init__(
name: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.query}, name=name, description=description
Expand All @@ -45,7 +45,7 @@ def __init__(
name: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.header}, name=name, description=description
Expand All @@ -72,7 +72,7 @@ def __init__(
name: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.cookie}, name=name, description=description
Expand Down
2 changes: 1 addition & 1 deletion fastapi/security/oauth2.py
Expand Up @@ -119,7 +119,7 @@ def __init__(
flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]] = OAuthFlowsModel(),
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model = OAuth2Model(flows=flows, description=description)
self.scheme_name = scheme_name or self.__class__.__name__
Expand Down
2 changes: 1 addition & 1 deletion fastapi/security/open_id_connect_url.py
Expand Up @@ -14,7 +14,7 @@ def __init__(
openIdConnectUrl: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model = OpenIdConnectModel(
openIdConnectUrl=openIdConnectUrl, description=description
Expand Down
Expand Up @@ -150,7 +150,6 @@ def get_app():

@pytest.fixture(name="client")
def get_client(app: FastAPI):

client = TestClient(app)
return client

Expand Down
Expand Up @@ -152,7 +152,6 @@ def get_app():

@pytest.fixture(name="client")
def get_client(app: FastAPI):

client = TestClient(app)
return client

Expand Down

0 comments on commit 9ba6772

Please sign in to comment.