Skip to content

Commit 1677122

Browse files
committed
Simplify type annotations
1 parent cc3bac7 commit 1677122

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import code
21
import contextlib
32
import errno
43
import itertools
@@ -22,13 +21,9 @@
2221
Union,
2322
cast,
2423
Type,
25-
TYPE_CHECKING,
2624
)
2725
from .._typing_compat import Literal
2826

29-
if TYPE_CHECKING:
30-
from ..repl import Interpreter
31-
3227
import blessings
3328
import greenlet
3429
from curtsies import (
@@ -327,7 +322,7 @@ def __init__(
327322
config: Config,
328323
locals_: Optional[Dict[str, Any]] = None,
329324
banner: Optional[str] = None,
330-
interp: Optional[code.InteractiveInterpreter] = None,
325+
interp: Optional[Interp] = None,
331326
orig_tcattrs: Optional[List[Any]] = None,
332327
):
333328
"""
@@ -372,7 +367,7 @@ def __init__(
372367
logger.debug("starting parent init")
373368
# interp is a subclass of repl.Interpreter, so it definitely,
374369
# implements the methods of Interpreter!
375-
super().__init__(cast("Interpreter", interp), config)
370+
super().__init__(interp, config)
376371

377372
self.formatter = BPythonFormatter(config.color_scheme)
378373

0 commit comments

Comments
 (0)