mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-30 22:19:57 +02:00
🐛 Use Optional instead of | none, for Python <3.10
This commit is contained in:
parent
4832d1542f
commit
071766efc2
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import math
|
||||
import unicodedata
|
||||
from math import ceil
|
||||
from typing import Optional
|
||||
|
||||
from rapidfuzz.distance import Levenshtein
|
||||
|
||||
|
@ -14,7 +15,7 @@ def align(t1, t2):
|
|||
return seq_align(s1, s2)
|
||||
|
||||
|
||||
def score_hint(er: float, n: int) -> int | None:
|
||||
def score_hint(er: float, n: int) -> Optional[int]:
|
||||
"""Calculate RapidFuzz score hint for a given error rate and count.
|
||||
|
||||
Gives the score hint for the distance functions (= expected distance) or None if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue