Skip to content

Commit f4520de

Browse files
authored
stricter conf + add typing to IPython/core/magic.py (#15130)
2 parents a0b6fdc + 31613eb commit f4520de

File tree

5 files changed

+132
-64
lines changed

5 files changed

+132
-64
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: astral-sh/setup-uv@v7
2929
- name: Install dependencies
3030
run: |
31-
uv pip install --system mypy pyflakes flake8 types-decorator
31+
uv pip install --system mypy pyflakes flake8 types-decorator '.[all]'
3232
- name: Lint with mypy
3333
run: |
3434
set -e

IPython/core/history.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
from typing import Tuple, Optional, TYPE_CHECKING
4040
from collections.abc import Iterable
4141
import typing
42+
import typing as t
43+
from typing import cast
4244
from warnings import warn
4345
from weakref import ref, WeakSet
4446

@@ -1131,7 +1133,7 @@ def run(self) -> None:
11311133
if hm() is not None:
11321134
self.db = sqlite3.connect(
11331135
str(hm().hist_file), # type: ignore [union-attr]
1134-
**hm().connection_options, # type: ignore [union-attr]
1136+
**cast(dict[str, t.Any], hm().connection_options), # type: ignore [union-attr]
11351137
)
11361138
while True:
11371139
self.save_flag.wait()

0 commit comments

Comments
 (0)