Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 30, 2023
1 parent e554bac commit 8f83ec9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions jupyter_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ def _context_default(self) -> zmq.Context:
def __del__(self):
"""Handle garbage collection. Destroy context if applicable."""
if (
self._created_context and self.context is not None and not self.context.closed
): # type:ignore[redundant-expr]
self._created_context
and self.context is not None
and not self.context.closed # type:ignore[redundant-expr]
):
if self.channels_running:
if self.log:
self.log.warning("Could not destroy zmq context for %s", self)
Expand Down
4 changes: 2 additions & 2 deletions jupyter_client/kernelspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def _get_kernel_spec_by_name(self, kernel_name, resource_dir):
) # type:ignore[operator]
if not kspec:
kspec = self.kernel_spec_class.from_resource_dir(
resource_dir
) # type:ignore[attr-defined]
resource_dir # type:ignore[attr-defined]
)

if not KPF.instance(parent=self.parent).is_provisioner_available(kspec):
raise NoSuchKernel(kernel_name)
Expand Down

0 comments on commit 8f83ec9

Please sign in to comment.