Skip to content

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
limwz01 committed Dec 18, 2024
1 parent 11ad317 commit c08f674
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ipykernel/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ def init_blackhole(self):
if self.no_stdout:
if sys.stdout is not None:
sys.stdout.flush()
sys.stdout = self._blackhole # type:ignore[misc]
sys.stdout = self._blackhole
if self.no_stderr:
if sys.stderr is not None:
sys.stderr.flush()
sys.stderr = self._blackhole # type:ignore[misc]
sys.stderr = self._blackhole

def init_io(self):
"""Redirect input streams and set a display hook."""
Expand Down Expand Up @@ -514,7 +514,7 @@ def init_io(self):
isinstance(handler, StreamHandler)
and (buffer := getattr(handler.stream, "buffer", None))
and (fileno := getattr(buffer, "fileno", None))
and fileno() == sys.stderr._original_stdstream_fd
and fileno() == sys.stderr._original_stdstream_fd # type:ignore[attr-defined]
):
self.log.debug("Seeing logger to stderr, rerouting to raw filedescriptor.")
io_wrapper = TextIOWrapper(
Expand Down

0 comments on commit c08f674

Please sign in to comment.