We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3844504 commit 159b332Copy full SHA for 159b332
src/corsheaders/decorators.py
@@ -18,7 +18,7 @@
18
F = TypeVar("F", bound=Callable[..., HttpResponseBase])
19
20
21
-def cors(func: Optional[F] = None, *, conf: Settings = _conf) -> F | Callable[[F], F]:
+def cors(func: F | None = None, *, conf: Settings = _conf) -> F | Callable[[F], F]:
22
if func is None:
23
return cast(Callable[[F], F], functools.partial(cors, conf=conf))
24
tests/views.py
@@ -5,8 +5,8 @@
5
from django.http import HttpResponse
6
from django.views.decorators.http import require_GET
7
8
-from corsheaders.decorators import cors
9
from corsheaders.conf import Settings
+from corsheaders.decorators import cors
10
11
12
@require_GET
0 commit comments