We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4991681 commit f8c56e3Copy full SHA for f8c56e3
captcha/models.py
@@ -3,7 +3,7 @@
3
import logging
4
import random
5
import time
6
-from typing import Final
+from typing import Callable, Final
7
8
from django.db import models
9
from django.utils import timezone
@@ -14,7 +14,7 @@
14
15
# Heavily based on session key generation in Django
16
# Use the system (hardware-based) random number generator if it exists.
17
-randrange: function = random.SystemRandom().randrange if hasattr(random, "SystemRandom") else random.randrange
+randrange: Callable = random.SystemRandom().randrange if hasattr(random, "SystemRandom") else random.randrange
18
19
MAX_RANDOM_KEY: Final[int] = 18446744073709551616 # 2 << 63
20
0 commit comments