Skip to content

Commit 9830be5

Browse files
committed
Fix mypy errors when importing stuff from IPython
1 parent bdc38c4 commit 9830be5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
2020
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2121
fetch-depth: 0 # Needed for setuptools_scm to work correctly
22-
- run: pip install -U --user pip mypy ipython-stubs
22+
- run: pip install -U --user pip mypy
2323
- run: mypy .

cmd2/cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131

132132
# NOTE: When using gnureadline with Python 3.13, start_ipython needs to be imported before any readline-related stuff
133133
try:
134-
from IPython import start_ipython
134+
from IPython import start_ipython # type: ignore[import]
135135
except ImportError:
136136
pass
137137

@@ -4641,7 +4641,7 @@ def do_ipy(self, _: argparse.Namespace) -> Optional[bool]: # pragma: no cover
46414641
try:
46424642
start_ipython # noqa F823
46434643
except NameError:
4644-
from IPython import start_ipython
4644+
from IPython import start_ipython # type: ignore[import]
46454645

46464646
from IPython.terminal.interactiveshell import ( # type: ignore[import]
46474647
TerminalInteractiveShell,

0 commit comments

Comments
 (0)