@@ -51,10 +51,10 @@ class LaunchImports(t.TypedDict):
51
51
def has_ipython () -> bool :
52
52
"""Return True if ipython is installed."""
53
53
try :
54
- from IPython import start_ipython # NOQA: F841
54
+ from IPython import start_ipython # NOQA: F401
55
55
except ImportError :
56
56
try :
57
- from IPython .Shell import IPShell # NOQA: F841
57
+ from IPython .Shell import IPShell # NOQA: F401
58
58
except ImportError :
59
59
return False
60
60
@@ -64,10 +64,10 @@ def has_ipython() -> bool:
64
64
def has_ptpython () -> bool :
65
65
"""Return True if ptpython is installed."""
66
66
try :
67
- from ptpython .repl import embed , run_config # F841
67
+ from ptpython .repl import embed , run_config # F401
68
68
except ImportError :
69
69
try :
70
- from prompt_toolkit .contrib .repl import embed , run_config # NOQA: F841
70
+ from prompt_toolkit .contrib .repl import embed , run_config # NOQA: F401
71
71
except ImportError :
72
72
return False
73
73
@@ -77,12 +77,12 @@ def has_ptpython() -> bool:
77
77
def has_ptipython () -> bool :
78
78
"""Return True if ptpython + ipython are both installed."""
79
79
try :
80
- from ptpython .ipython import embed # F841
81
- from ptpython .repl import run_config # F841
80
+ from ptpython .ipython import embed # F401
81
+ from ptpython .repl import run_config # F401
82
82
except ImportError :
83
83
try :
84
- from prompt_toolkit .contrib .ipython import embed # NOQA: F841
85
- from prompt_toolkit .contrib .repl import run_config # NOQA: F841
84
+ from prompt_toolkit .contrib .ipython import embed # NOQA: F401
85
+ from prompt_toolkit .contrib .repl import run_config # NOQA: F401
86
86
except ImportError :
87
87
return False
88
88
@@ -92,7 +92,7 @@ def has_ptipython() -> bool:
92
92
def has_bpython () -> bool :
93
93
"""Return True if bpython is installed."""
94
94
try :
95
- from bpython import embed # NOQA: F841
95
+ from bpython import embed # NOQA: F401
96
96
except ImportError :
97
97
return False
98
98
return True
@@ -119,7 +119,7 @@ def get_bpython(
119
119
if extra_args is None :
120
120
extra_args = {}
121
121
122
- from bpython import embed # F841
122
+ from bpython import embed
123
123
124
124
def launch_bpython () -> None :
125
125
imported_objects = get_launch_args (** options )
0 commit comments