Skip to content

Commit a86d088

Browse files
committed
chore(shell): ruff 0.4.7 autofixes
❯ ruff check . --fix --show-fixes src/tmuxp/shell.py:54:29: F401 `IPython.start_ipython` imported but unused; consider using `importlib.util.find_spec` to test for availability src/tmuxp/shell.py:57:39: F401 `IPython.Shell.IPShell` imported but unused; consider using `importlib.util.find_spec` to test for availability src/tmuxp/shell.py:70:53: F401 `prompt_toolkit.contrib.repl.embed` imported but unused; consider using `importlib.util.find_spec` to test for availability src/tmuxp/shell.py:70:60: F401 `prompt_toolkit.contrib.repl.run_config` imported but unused; consider using `importlib.util.find_spec` to test for availability src/tmuxp/shell.py:84:56: F401 `prompt_toolkit.contrib.ipython.embed` imported but unused; consider using `importlib.util.find_spec` to test for availability src/tmuxp/shell.py:85:53: F401 `prompt_toolkit.contrib.repl.run_config` imported but unused; consider using `importlib.util.find_spec` to test for availability src/tmuxp/shell.py:95:29: F401 `bpython.embed` imported but unused; consider using `importlib.util.find_spec` to test for availability Fixed 6 errors: - src/tmuxp/shell.py: 6 × RUF100 (unused-noqa)
1 parent b8258a3 commit a86d088

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/tmuxp/shell.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ class LaunchImports(t.TypedDict):
5151
def has_ipython() -> bool:
5252
"""Return True if ipython is installed."""
5353
try:
54-
from IPython import start_ipython # NOQA: F841
54+
from IPython import start_ipython
5555
except ImportError:
5656
try:
57-
from IPython.Shell import IPShell # NOQA: F841
57+
from IPython.Shell import IPShell
5858
except ImportError:
5959
return False
6060

@@ -67,7 +67,7 @@ def has_ptpython() -> bool:
6767
from ptpython.repl import embed, run_config # F841
6868
except ImportError:
6969
try:
70-
from prompt_toolkit.contrib.repl import embed, run_config # NOQA: F841
70+
from prompt_toolkit.contrib.repl import embed, run_config
7171
except ImportError:
7272
return False
7373

@@ -81,8 +81,8 @@ def has_ptipython() -> bool:
8181
from ptpython.repl import run_config # F841
8282
except ImportError:
8383
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
85+
from prompt_toolkit.contrib.repl import run_config
8686
except ImportError:
8787
return False
8888

@@ -92,7 +92,7 @@ def has_ptipython() -> bool:
9292
def has_bpython() -> bool:
9393
"""Return True if bpython is installed."""
9494
try:
95-
from bpython import embed # NOQA: F841
95+
from bpython import embed
9696
except ImportError:
9797
return False
9898
return True

0 commit comments

Comments
 (0)