@@ -277,9 +277,9 @@ def ishidden(self, excinfo: Optional["ExceptionInfo[BaseException]"]) -> bool:
277
277
278
278
Mostly for internal use.
279
279
"""
280
- tbh : Union [
281
- bool , Callable [[ Optional [ ExceptionInfo [ BaseException ]]], bool ]
282
- ] = False
280
+ tbh : Union [bool , Callable [[ Optional [ ExceptionInfo [ BaseException ]]], bool ]] = (
281
+ False
282
+ )
283
283
for maybe_ns_dct in (self .frame .f_locals , self .frame .f_globals ):
284
284
# in normal cases, f_locals and f_globals are dictionaries
285
285
# however via `exec(...)` / `eval(...)` they can be other types
@@ -376,12 +376,10 @@ def cut(
376
376
return self
377
377
378
378
@overload
379
- def __getitem__ (self , key : "SupportsIndex" ) -> TracebackEntry :
380
- ...
379
+ def __getitem__ (self , key : "SupportsIndex" ) -> TracebackEntry : ...
381
380
382
381
@overload
383
- def __getitem__ (self , key : slice ) -> "Traceback" :
384
- ...
382
+ def __getitem__ (self , key : slice ) -> "Traceback" : ...
385
383
386
384
def __getitem__ (
387
385
self , key : Union ["SupportsIndex" , slice ]
@@ -1055,13 +1053,13 @@ def repr_excinfo(
1055
1053
# full support for exception groups added to ExceptionInfo.
1056
1054
# See https://github.com/pytest-dev/pytest/issues/9159
1057
1055
if isinstance (e , BaseExceptionGroup ):
1058
- reprtraceback : Union [
1059
- ReprTracebackNative , ReprTraceback
1060
- ] = ReprTracebackNative (
1061
- traceback . format_exception (
1062
- type ( excinfo_ .value ) ,
1063
- excinfo_ .value ,
1064
- excinfo_ . traceback [ 0 ]. _rawentry ,
1056
+ reprtraceback : Union [ReprTracebackNative , ReprTraceback ] = (
1057
+ ReprTracebackNative (
1058
+ traceback . format_exception (
1059
+ type ( excinfo_ . value ),
1060
+ excinfo_ .value ,
1061
+ excinfo_ .traceback [ 0 ]. _rawentry ,
1062
+ )
1065
1063
)
1066
1064
)
1067
1065
else :
0 commit comments