Skip to content

Commit a5e93e6

Browse files
committed
Minor types updates
Subset of ipython#1272 – which should be incontroversial and does not conflict with recent changes.
1 parent bf10447 commit a5e93e6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ipykernel/kernelapp.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from .ipkernel import IPythonKernel
5555
from .parentpoller import ParentPollerUnix, ParentPollerWindows
5656
from .shellchannel import ShellChannelThread
57+
from .thread import BaseThread
5758
from .zmqshell import ZMQInteractiveShell
5859

5960
# -----------------------------------------------------------------------------
@@ -142,9 +143,9 @@ class IPKernelApp(BaseIPythonApplication, InteractiveShellApp, ConnectionFileMix
142143
debug_shell_socket = Any()
143144
stdin_socket = Any()
144145
iopub_socket = Any()
145-
iopub_thread = Any()
146-
control_thread = Any()
147-
shell_channel_thread = Any()
146+
iopub_thread: BaseThread
147+
control_thread: BaseThread
148+
shell_channel_thread: BaseThread
148149

149150
_ports = Dict()
150151

pyproject.toml

+2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ ignore = [
275275
"G002",
276276
# `open()` should be replaced by `Path.open()`
277277
"PTH123",
278+
# use `X | Y` for type annotations, this does not works for dynamic getting type hints on older python
279+
"UP007",
278280
]
279281
unfixable = [
280282
# Don't touch print statements

0 commit comments

Comments
 (0)