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

Appearance settings

Commit 7908efd

Browse filesBrowse files
committed
Blacken
1 parent 2d493de commit 7908efd
Copy full SHA for 7908efd

4 files changed

+136-114Lines changed: 136 additions & 114 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpdb/__init__.py‎

Copy file name to clipboardExpand all lines: bpdb/__init__.py
+22-14Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,18 @@ def set_trace():
4646

4747
# Adopted verbatim from pdb for completeness:
4848

49+
4950
def post_mortem(t=None):
5051
# handling the default
5152
if t is None:
5253
# sys.exc_info() returns (type, value, traceback) if an exception is
5354
# being handled, otherwise it returns None
5455
t = sys.exc_info()[2]
5556
if t is None:
56-
raise ValueError("A valid traceback must be passed if no "
57-
"exception is being handled")
57+
raise ValueError(
58+
"A valid traceback must be passed if no "
59+
"exception is being handled"
60+
)
5861

5962
p = BPdb()
6063
p.reset()
@@ -66,26 +69,28 @@ def pm():
6669

6770

6871
def main():
69-
parser = OptionParser(
70-
usage='Usage: %prog [options] [file [args]]')
71-
parser.add_option('--version', '-V', action='store_true',
72-
help='Print version and exit.')
72+
parser = OptionParser(usage="Usage: %prog [options] [file [args]]")
73+
parser.add_option(
74+
"--version", "-V", action="store_true", help="Print version and exit."
75+
)
7376
options, args = parser.parse_args(sys.argv)
7477
if options.version:
75-
print('bpdb on top of bpython version', __version__, end="")
76-
print('on top of Python', sys.version.split()[0])
77-
print('(C) 2008-2013 Bob Farrell, Andreas Stuehrk et al. '
78-
'See AUTHORS for detail.')
78+
print("bpdb on top of bpython version", __version__, end="")
79+
print("on top of Python", sys.version.split()[0])
80+
print(
81+
"(C) 2008-2013 Bob Farrell, Andreas Stuehrk et al. "
82+
"See AUTHORS for detail."
83+
)
7984
return 0
8085

8186
if len(args) < 2:
82-
print('usage: bpdb scriptfile [arg] ...')
87+
print("usage: bpdb scriptfile [arg] ...")
8388
return 2
8489

8590
# The following code is based on Python's pdb.py.
8691
mainpyfile = args[1]
8792
if not os.path.exists(mainpyfile):
88-
print('Error:', mainpyfile, 'does not exist')
93+
print("Error:", mainpyfile, "does not exist")
8994
return 1
9095

9196
# Hide bpdb from argument list.
@@ -114,5 +119,8 @@ def main():
114119
print("Running 'cont' or 'step' will restart the program")
115120
t = sys.exc_info()[2]
116121
pdb.interaction(None, t)
117-
print("Post mortem debugger finished. The " + mainpyfile +
118-
" will be restarted")
122+
print(
123+
"Post mortem debugger finished. The "
124+
+ mainpyfile
125+
+ " will be restarted"
126+
)
Collapse file

‎bpdb/__main__.py‎

Copy file name to clipboardExpand all lines: bpdb/__main__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import sys
2828

29-
if __name__ == '__main__':
29+
if __name__ == "__main__":
3030
from . import main
31+
3132
sys.exit(main())
Collapse file

‎bpdb/debugger.py‎

Copy file name to clipboardExpand all lines: bpdb/debugger.py
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BPdb(pdb.Pdb):
3333

3434
def __init__(self, *args, **kwargs):
3535
pdb.Pdb.__init__(self, *args, **kwargs)
36-
self.prompt = '(BPdb) '
36+
self.prompt = "(BPdb) "
3737
self.intro = 'Use "B" to enter bpython, Ctrl-d to exit it.'
3838

3939
def postloop(self):
@@ -46,14 +46,15 @@ def postloop(self):
4646
def do_Bpython(self, arg):
4747
locals_ = self.curframe.f_globals.copy()
4848
locals_.update(self.curframe.f_locals)
49-
bpython.embed(locals_, ['-i'])
50-
49+
bpython.embed(locals_, ["-i"])
5150

5251
def help_Bpython(self):
5352
print("B(python)")
5453
print("")
55-
print("Invoke the bpython interpreter for this stack frame. To exit "
56-
"bpython and return to a standard pdb press Ctrl-d")
54+
print(
55+
"Invoke the bpython interpreter for this stack frame. To exit "
56+
"bpython and return to a standard pdb press Ctrl-d"
57+
)
5758

5859
# shortcuts
5960
do_B = do_Bpython

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.