Skip to content

Commit

Permalink
fixes models.py function to Callable
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasGoncSilva authored Mar 21, 2024
1 parent 4991681 commit f8c56e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions captcha/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import random
import time
from typing import Final
from typing import Callable, Final

from django.db import models
from django.utils import timezone
Expand All @@ -14,7 +14,7 @@

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

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

Expand Down

0 comments on commit f8c56e3

Please sign in to comment.