Skip to content

Commit

Permalink
Due to bad typing of kwargs it things that env is a str
Browse files Browse the repository at this point in the history
but in fact it in general should be a dict
  • Loading branch information
krassowski committed Jul 10, 2024
1 parent 8963d2f commit de1730d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jupyter_server/services/kernels/kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ async def _async_start_kernel( # type:ignore[override]
"Kernel args (excluding env): %r", {k: v for k, v in kwargs.items() if k != "env"}
)
env = kwargs.get("env", None)
if env and isinstance(env, dict):
self.log.debug("Kernel argument 'env' passed with: %r", list(env.keys()))
if env and isinstance(env, dict): # type:ignore[unreachable]
self.log.debug("Kernel argument 'env' passed with: %r", list(env.keys())) # type:ignore[unreachable]

# Increase the metric of number of kernels running
# for the relevant kernel type by 1
Expand Down

0 comments on commit de1730d

Please sign in to comment.