1
0
mirror of synced 2024-11-14 18:38:03 +01:00

type hint group_by keys as hashable

This commit is contained in:
Stepland 2021-05-11 01:37:00 +02:00
parent cb2bbfe370
commit bfbbc59e4a

View File

@ -6,7 +6,7 @@ from decimal import Decimal
from fractions import Fraction
from functools import reduce
from math import gcd
from typing import Callable, Dict, List, Optional, TypeVar
from typing import Callable, Dict, Hashable, List, Optional, TypeVar
def single_lcm(a: int, b: int) -> int:
@ -40,7 +40,7 @@ def fraction_to_decimal(frac: Fraction) -> Decimal:
return frac.numerator / Decimal(frac.denominator)
K = TypeVar("K")
K = TypeVar("K", bound=Hashable)
V = TypeVar("V")