Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12e4659

Browse files
committed
Use super
1 parent15338a2 commit12e4659

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

‎bpdb/debugger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class BPdb(pdb.Pdb):
2828
"""PDB with BPython support."""
2929

3030
def__init__(self,*args,**kwargs):
31-
pdb.Pdb.__init__(self,*args,**kwargs)
31+
super().__init__(*args,**kwargs)
3232
self.prompt="(BPdb) "
3333
self.intro='Use "B" to enter bpython, Ctrl-d to exit it.'
3434

3535
defpostloop(self):
3636
# We only want to show the intro message once.
3737
self.intro=None
38-
pdb.Pdb.postloop(self)
38+
super().postloop()
3939

4040
# cmd.Cmd commands
4141

‎bpython/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,7 @@ def push(self, s: str, insert_into_history: bool = True) -> bool:
11281128
# curses.raw(True) prevents C-c from causing a SIGINT
11291129
curses.raw(False)
11301130
try:
1131-
x:bool=repl.Repl.push(self,s,insert_into_history)
1132-
returnx
1131+
returnsuper().push(s,insert_into_history)
11331132
exceptSystemExitase:
11341133
# Avoid a traceback on e.g. quit()
11351134
self.do_exit=True

‎bpython/urwid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ def push(self, s, insert_into_history=True):
938938
signal.signal(signal.SIGINT,signal.default_int_handler)
939939
# Pretty blindly adapted from bpython.cli
940940
try:
941-
returnrepl.Repl.push(self,s,insert_into_history)
941+
returnsuper().push(s,insert_into_history)
942942
exceptSystemExitase:
943943
self.exit_value=e.args
944944
raiseurwid.ExitMainLoop()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp