Skip to content

Commit 8ce0578

Browse files
committed
Removed redundant else statement
1 parent 3016d7a commit 8ce0578

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fastapi/security/api_key.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ def check_api_key(api_key: Optional[str], auto_error: bool) -> Optional[str]:
1515
raise HTTPException(
1616
status_code=HTTP_403_FORBIDDEN, detail="Not authenticated"
1717
)
18-
else:
19-
return None
18+
return None
2019
return api_key
2120

2221

0 commit comments

Comments
 (0)