|
35 | 35 | from IPython.utils.process import arg_split, system # type:ignore[attr-defined] |
36 | 36 | from jupyter_client.session import Session, extract_header |
37 | 37 | from jupyter_core.paths import jupyter_runtime_dir |
38 | | -from traitlets import Any, CBool, CBytes, Instance, Type, default, observe |
| 38 | +from traitlets import Any, CBool, CBytes, Instance, default, observe |
39 | 39 |
|
40 | 40 | from ipykernel import connect_qtconsole, get_connection_file, get_connection_info |
41 | 41 | from ipykernel.displayhook import ZMQShellDisplayHook |
|
44 | 44 | try: |
45 | 45 | from IPython.core.history import HistoryOutput |
46 | 46 | except ImportError: |
47 | | - HistoryOutput = None # type: ignore[assignment] |
| 47 | + HistoryOutput: type | None = None |
48 | 48 |
|
49 | 49 | # ----------------------------------------------------------------------------- |
50 | 50 | # Functions and classes |
@@ -517,8 +517,8 @@ def __init__(self, *args, **kwargs): |
517 | 517 | self._parent_header = contextvars.ContextVar("parent_header") |
518 | 518 | self._parent_header.set({}) |
519 | 519 |
|
520 | | - displayhook_class = Type(ZMQShellDisplayHook) |
521 | | - display_pub_class = Type(ZMQDisplayPublisher) |
| 520 | + displayhook_class = type(ZMQShellDisplayHook) |
| 521 | + display_pub_class = type(ZMQDisplayPublisher) |
522 | 522 | data_pub_class = Any() |
523 | 523 | kernel = Any() |
524 | 524 | _parent_header: contextvars.ContextVar[dict[str, Any]] |
|
0 commit comments