Skip to content

Commit 3ff3cd6

Browse files
Use strict StrOrPromise with typeguard
1 parent bc36303 commit 3ff3cd6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

evap/evaluation/tools.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
from django.utils.translation import get_language
1818
from django.views.generic import FormView
1919

20-
if TYPE_CHECKING:
20+
try:
2121
from django_stubs_ext import StrOrPromise
22-
else:
22+
except ImportError:
23+
assert not TYPE_CHECKING
2324
StrOrPromise = Any
2425

2526
M = TypeVar("M", bound=Model)

0 commit comments

Comments
 (0)