mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-20 00:53:45 -04:00
⬆️ Upgrade configuration for Ruff v0.2.0 (#11075)
This commit is contained in:
1 parent
b0dd4f7bfc
commit
5ccc869fee
44 files changed
+76
-76
No files matched your search
@@ -67,7 +67,7 @@ async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
|
||||
|
||||
|
||||
async def get_current_active_user(
|
||||
current_user: Annotated[User, Depends(get_current_user)]
|
||||
current_user: Annotated[User, Depends(get_current_user)],
|
||||
):
|
||||
if current_user.disabled:
|
||||
raise HTTPException(status_code=400, detail="Inactive user")
|
||||
@@ -89,6 +89,6 @@ async def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]):
|
||||
|
||||
@app.get("/users/me")
|
||||
async def read_users_me(
|
||||
current_user: Annotated[User, Depends(get_current_active_user)]
|
||||
current_user: Annotated[User, Depends(get_current_active_user)],
|
||||
):
|
||||
return current_user
|
||||
Reference in new issue
Block a user