Skip to content

Commit 5b9f05b

Browse files
authored
Fix linting errors (#1480)
1 parent e4d02f6 commit 5b9f05b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)