Skip to content

Commit 2dc7cc4

Browse files
authored
Use Literal from typing on 3.8+ (#9)
1 parent 4b17edf commit 2dc7cc4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

types.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
import builtins
99
import sys
1010
import typing
11-
import typing_extensions
11+
12+
if sys.version_info >= (3, 8):
13+
from typing import Literal
14+
else:
15+
from typing_extensions import Literal
1216

1317

1418
__all__ = (
@@ -17,7 +21,7 @@
1721
)
1822

1923
_BitString = typing.TypeVar('_BitString', bound='BitString')
20-
_BitOrderType = typing_extensions.Literal['big', 'little']
24+
_BitOrderType = Literal['big', 'little']
2125

2226

2327
class BitString:

0 commit comments

Comments
 (0)