Skip to content

Commit 61d703e

Browse files
committed
🐛 Fix types for Python 3.8
1 parent 3e80032 commit 61d703e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fastapi/security/http.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import binascii
22
from base64 import b64decode
3-
from typing import Optional
3+
from typing import Dict, Optional
44

55
from annotated_doc import Doc
66
from fastapi.exceptions import HTTPException
@@ -82,7 +82,7 @@ def __init__(
8282
self.scheme_name = scheme_name or self.__class__.__name__
8383
self.auto_error = auto_error
8484

85-
def make_authenticate_headers(self) -> dict[str, str]:
85+
def make_authenticate_headers(self) -> Dict[str, str]:
8686
return {"WWW-Authenticate": f"{self.model.scheme.title()}"}
8787

8888
def make_not_authenticated_error(self) -> HTTPException:
@@ -197,7 +197,7 @@ def __init__(
197197
self.realm = realm
198198
self.auto_error = auto_error
199199

200-
def make_authenticate_headers(self) -> dict[str, str]:
200+
def make_authenticate_headers(self) -> Dict[str, str]:
201201
if self.realm:
202202
return {"WWW-Authenticate": f'Basic realm="{self.realm}"'}
203203
return {"WWW-Authenticate": "Basic"}

0 commit comments

Comments
 (0)