Skip to content

Commit

Permalink
Literal type hint from typing_extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Apr 26, 2024
1 parent 7807d14 commit 3447604
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metronomes/metronome.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from typing import Type, Callable, Union, Optional, Any, Literal
from typing import Type, Callable, Union, Optional, Any

try:
from typing import Literal
except ImportError: # pragma: no cover
from typing_extensions import Literal # type: ignore[assignment]

from threading import Thread, RLock
from time import perf_counter, sleep
from functools import partial
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies = [
'cantok>=0.0.22',
'escaping>=0.0.11',
'locklib>=0.0.15',
'typing_extensions ; python_version < "3.8"',
]
classifiers = [
'Operating System :: OS Independent',
Expand Down

0 comments on commit 3447604

Please sign in to comment.