Skip to content

Commit 602b4c4

Browse files
committed
fix whitespace
1 parent 991e982 commit 602b4c4

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

Lib/test/test_traceback.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,32 +2194,32 @@ def some_inner():
21942194
[f'{__file__}:{some_inner.__code__.co_firstlineno + 1}'])
21952195

21962196
def test_dropping_frames(self):
2197-
def f():
2198-
1/0
2199-
2200-
def g():
2201-
try:
2202-
f()
2203-
except:
2204-
return sys.exc_info()
2205-
2206-
exc_info = g()
2207-
2208-
class Skip_G(traceback.StackSummary):
2209-
def format_frame_summary(self, frame_summary):
2210-
if frame_summary.name == 'g':
2211-
return None
2212-
return super().format_frame_summary(frame_summary)
2213-
2214-
stack = Skip_G.extract(
2215-
traceback.walk_tb(exc_info[2])).format()
2216-
2217-
self.assertEqual(len(stack), 1)
2218-
lno = f.__code__.co_firstlineno + 1
2219-
self.assertEqual(
2220-
stack[0],
2221-
f' File "{__file__}", line {lno}, in f\n 1/0\n'
2222-
)
2197+
def f():
2198+
1/0
2199+
2200+
def g():
2201+
try:
2202+
f()
2203+
except:
2204+
return sys.exc_info()
2205+
2206+
exc_info = g()
2207+
2208+
class Skip_G(traceback.StackSummary):
2209+
def format_frame_summary(self, frame_summary):
2210+
if frame_summary.name == 'g':
2211+
return None
2212+
return super().format_frame_summary(frame_summary)
2213+
2214+
stack = Skip_G.extract(
2215+
traceback.walk_tb(exc_info[2])).format()
2216+
2217+
self.assertEqual(len(stack), 1)
2218+
lno = f.__code__.co_firstlineno + 1
2219+
self.assertEqual(
2220+
stack[0],
2221+
f' File "{__file__}", line {lno}, in f\n 1/0\n'
2222+
)
22232223

22242224

22252225
class TestTracebackException(unittest.TestCase):

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ def format(self, *, chain=True, _ctx=None):
917917
# format exception group
918918
is_toplevel = (_ctx.exception_group_depth == 0)
919919
if is_toplevel:
920-
_ctx.exception_group_depth += 1
920+
_ctx.exception_group_depth += 1
921921

922922
if exc.stack:
923923
yield from _ctx.emit(

0 commit comments

Comments
 (0)