Skip to content

Commit 95b26f0

Browse files
committed
Pin traitlets>=5.2.2
1 parent e6aa4a2 commit 95b26f0

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

nbclient/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ class NbClientApp(JupyterApp):
3535
An application used to execute notebook files (``*.ipynb``)
3636
"""
3737

38-
version = __version__
38+
version = Unicode(__version__)
3939
name = 'jupyter-execute'
4040
aliases = nbclient_aliases
4141
flags = nbclient_flags
4242

43-
description = Unicode("An application used to execute notebook files (*.ipynb)")
43+
description = "An application used to execute notebook files (*.ipynb)"
4444
notebooks = List([], help="Path of notebooks to convert").tag(config=True)
4545
timeout: int = Integer(
4646
None,

nbclient/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from .util import ensure_async, run_hook, run_sync
4040

4141

42-
def timestamp(msg: t.Optional[Dict] = None) -> str:
42+
def timestamp(msg: t.Optional[t.Dict] = None) -> str:
4343
if msg and 'header' in msg: # The test mocks don't provide a header, so tolerate that
4444
msg_header = msg['header']
4545
if 'date' in msg_header and isinstance(msg_header['date'], datetime.datetime):
@@ -288,7 +288,7 @@ class NotebookClient(LoggingConfigurable):
288288
""",
289289
).tag(config=True)
290290

291-
kernel_manager_class: KernelManager = Type(config=True, help='The kernel manager class to use.')
291+
kernel_manager_class = Type(config=True, klass=KernelManager, help='The kernel manager class to use.')
292292

293293
on_notebook_start: t.Optional[t.Callable] = Callable(
294294
default_value=None,
@@ -390,7 +390,7 @@ def _kernel_manager_class_default(self) -> t.Type[KernelManager]:
390390

391391
return AsyncKernelManager
392392

393-
_display_id_map: t.Dict[str, t.Dict] = Dict(
393+
_display_id_map = Dict(
394394
help=dedent(
395395
"""
396396
mapping of locations of outputs with a given display_id
@@ -423,7 +423,7 @@ def _kernel_manager_class_default(self) -> t.Type[KernelManager]:
423423
""",
424424
).tag(config=True)
425425

426-
resources: t.Dict = Dict(
426+
resources = Dict(
427427
help=dedent(
428428
"""
429429
Additional resources used in the conversion process. For example,

nbclient/tests/test_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ def test_mock_wrapper(self):
211211
cell_mock = NotebookNode(
212212
source='"foo" = "bar"', metadata={}, cell_type='code', outputs=[]
213213
)
214-
executor = NotebookClient({}) # type:ignore
214+
class NotebookClientWithParentID(NotebookClient):
215+
parent_id: str
216+
executor = NotebookClientWithParentID({}) # type:ignore
215217
executor.nb = {'cells': [cell_mock]} # type:ignore
216218

217219
# self.kc.iopub_channel.get_msg => message_mock.side_effect[i]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jupyter_client>=6.1.5
22
nbformat>=5.0
33
nest_asyncio
4-
traitlets>=5.0.0
4+
traitlets>=5.2.2

0 commit comments

Comments
 (0)