Skip to content

Commit 78ec905

Browse files
committed
Fix type hint for py3.9.
1 parent 591b262 commit 78ec905

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/timecode/timecode.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313

1414
if sys.version_info >= (3, 11):
1515
from typing import Self
16+
_frate_type = Fraction | str | float | tuple[int, int]
1617
else:
1718
from typing_extensions import Self
18-
19-
_Framerate = NewType("_Framerate", Fraction | str | float | tuple[int, int])
19+
from typing import Union
20+
_frate_type = Union[Fraction, str, float, tuple[int, int]]
21+
22+
_Framerate = NewType("_Framerate", _frate_type)
2023

2124
#%%
2225
class _Timestamp:

0 commit comments

Comments
 (0)