Skip to content

Commit d74c8e7

Browse files
committed
Fixed type compatibility for python version 3.9 #2
1 parent 1975ee5 commit d74c8e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

portion/dict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Mapping,
1010
MutableMapping,
1111
)
12-
from typing import Protocol, TypeVar, cast, overload, override
12+
from typing import Generic, Protocol, TypeVar, cast, overload, override
1313

1414
from sortedcontainers import SortedDict
1515
from sortedcontainers.sorteddict import ItemsView, KeysView, ValuesView
@@ -34,7 +34,7 @@ class HowToCombineWithInterval(Protocol):
3434
def __call__(self, x: V, y: V, i: Interval) -> V: ...
3535

3636

37-
class IntervalDict[V](MutableMapping[object, V]):
37+
class IntervalDict(Generic[V], MutableMapping[object, V]):
3838
"""
3939
An IntervalDict is a dict-like data structure that maps from intervals to data,where
4040
keys can be single values or Interval instances.

0 commit comments

Comments
 (0)