Skip to content

Commit f8c56e3

Browse files
fixes models.py function to Callable
1 parent 4991681 commit f8c56e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

captcha/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44
import random
55
import time
6-
from typing import Final
6+
from typing import Callable, Final
77

88
from django.db import models
99
from django.utils import timezone
@@ -14,7 +14,7 @@
1414

1515
# Heavily based on session key generation in Django
1616
# Use the system (hardware-based) random number generator if it exists.
17-
randrange: function = random.SystemRandom().randrange if hasattr(random, "SystemRandom") else random.randrange
17+
randrange: Callable = random.SystemRandom().randrange if hasattr(random, "SystemRandom") else random.randrange
1818

1919
MAX_RANDOM_KEY: Final[int] = 18446744073709551616 # 2 << 63
2020

0 commit comments

Comments
 (0)