Skip to content

Commit 463cf84

Browse files
committed
Fix linting errors
1 parent e4d02f6 commit 463cf84

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ipykernel/ipkernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def _forward_input(self, allow_stdin=False):
292292
builtins.input = self.raw_input
293293

294294
self._save_getpass = getpass.getpass
295-
getpass.getpass = self.getpass
295+
getpass.getpass = self.getpass # type:ignore[assignment]
296296

297297
def _restore_input(self):
298298
"""Restore raw_input, getpass"""

ipykernel/kernelapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ def init_pdb(self):
694694
# Only available in newer IPython releases:
695695
debugger.Pdb = debugger.InterruptiblePdb # type:ignore[misc]
696696
pdb.Pdb = debugger.Pdb # type:ignore[assignment,misc]
697-
pdb.set_trace = debugger.set_trace
697+
pdb.set_trace = debugger.set_trace # type:ignore[assignment]
698698

699699
@catch_config_error
700700
def initialize(self, argv=None):

ipykernel/zmqshell.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def edit(self, parameter_s="", last_call=None):
352352

353353
payload = {"source": "edit_magic", "filename": filename, "line_number": lineno}
354354
assert self.shell is not None
355-
self.shell.payload_manager.write_payload(payload) # type: ignore[unreachable]
355+
self.shell.payload_manager.write_payload(payload) # type: ignore[union-attr]
356356

357357
# A few magics that are adapted to the specifics of using pexpect and a
358358
# remote terminal
@@ -361,7 +361,7 @@ def edit(self, parameter_s="", last_call=None):
361361
def clear(self, arg_s):
362362
"""Clear the terminal."""
363363
assert self.shell is not None
364-
if os.name == "posix": # type: ignore[unreachable]
364+
if os.name == "posix":
365365
self.shell.system("clear")
366366
else:
367367
self.shell.system("cls")
@@ -383,7 +383,7 @@ def less(self, arg_s):
383383

384384
if arg_s.endswith(".py"):
385385
assert self.shell is not None
386-
cont = self.shell.pycolorize(openpy.read_py_file(arg_s, skip_encoding_cookie=False)) # type: ignore[unreachable]
386+
cont = self.shell.pycolorize(openpy.read_py_file(arg_s, skip_encoding_cookie=False))
387387
else:
388388
with open(arg_s) as fid:
389389
cont = fid.read()
@@ -398,7 +398,7 @@ def less(self, arg_s):
398398
def man(self, arg_s):
399399
"""Find the man page for the given command and display in pager."""
400400
assert self.shell is not None
401-
page.page(self.shell.getoutput("man %s | col -b" % arg_s, split=False)) # type: ignore[unreachable]
401+
page.page(self.shell.getoutput("man %s | col -b" % arg_s, split=False))
402402

403403
@line_magic
404404
def connect_info(self, arg_s):

0 commit comments

Comments
 (0)