Skip to content

Commit 194a000

Browse files
committed
Fix import of Literal
1 parent f51d61b commit 194a000

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

bpython/curtsiesfrontend/_internal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
import pydoc
2424
from types import TracebackType
25-
from typing import Optional, Literal, Type
25+
from typing import Optional, Type
26+
from typing_extensions import Literal
2627

2728
from .. import _internal
2829

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
import unicodedata
1414
from enum import Enum
1515
from types import TracebackType
16-
from typing import Dict, Any, List, Optional, Tuple, Union, cast, Literal, Type
16+
from typing import Dict, Any, List, Optional, Tuple, Union, cast, Type
17+
from typing_extensions import Literal
1718

1819
import blessings
1920
import greenlet

bpython/filelock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222

23-
from typing import Optional, Type, IO, Literal
23+
from typing import Optional, Type, IO
24+
from typing_extensions import Literal
2425
from types import TracebackType
2526

2627
has_fcntl = True

bpython/inspection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
import pydoc
2727
import re
2828
from collections import namedtuple
29-
from typing import Any, Optional, Literal, Type
29+
from typing import Any, Optional, Type
3030
from types import MemberDescriptorType, TracebackType
31+
from typing_extensions import Literal
3132

3233
from pygments.token import Token
3334
from pygments.lexers import Python3Lexer

bpython/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
from itertools import takewhile
3838
from pathlib import Path
3939
from types import ModuleType, TracebackType
40-
from typing import cast, Tuple, Any, Optional, Literal, Type
40+
from typing import cast, Tuple, Any, Optional, Type
41+
from typing_extensions import Literal
4142

4243
from pygments.lexers import Python3Lexer
4344
from pygments.token import Token

0 commit comments

Comments
 (0)