Skip to content

Commit 6524b2d

Browse files
committed
Use Optional, as | fails at runtime for qtconsole
1 parent 065fc96 commit 6524b2d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ipykernel/inprocess/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# -----------------------------------------------------------------------------
1313

1414

15-
from typing import Any
15+
from typing import Any, Optional
1616

1717
from jupyter_client.client import KernelClient
1818
from jupyter_client.clientabc import KernelClientABC
@@ -110,8 +110,8 @@ async def execute( # type:ignore [override]
110110
code: str,
111111
silent: bool = False,
112112
store_history: bool = True,
113-
user_expressions: dict[str, Any] | None = None,
114-
allow_stdin: bool | None = None,
113+
user_expressions: Optional[dict[str, Any]] = None,
114+
allow_stdin: Optional[bool] = None,
115115
stop_on_error: bool = True,
116116
) -> str:
117117
"""Execute code on the client."""

tests/test_subshells.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def test_run_concurrently_timing(include_main_shell):
218218
assert duration < timedelta(seconds=sum(times))
219219

220220

221-
@pytest.mark.xfail(struct=False, reason="subshell still sometime give different results")
221+
@pytest.mark.xfail(strict=False, reason="subshell still sometime give different results")
222222
def test_execution_count():
223223
with new_kernel() as kc:
224224
subshell_id = create_subshell_helper(kc)["subshell_id"]

0 commit comments

Comments
 (0)