Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Commit c94bf59

Browse files
committed
re-format code with max 79 characters per line.
1 parent 7a537d6 commit c94bf59

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

exceptiongroup/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def __init__(self, message, exceptions, sources):
3030
self.exceptions = list(exceptions)
3131
for exc in self.exceptions:
3232
if not isinstance(exc, BaseException):
33-
raise TypeError("Expected an exception object, not {!r}".format(exc))
33+
raise TypeError(
34+
"Expected an exception object, not {!r}".format(exc)
35+
)
3436
self.message = message
3537
self.sources = list(sources)
3638
if len(self.sources) != len(self.exceptions):

exceptiongroup/_monkeypatch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def traceback_exception_format(self, *, chain=True):
7474

7575
for exc, source in zip(self.exceptions, self.sources):
7676
yield "\n {}:\n\n".format(source)
77-
yield from (textwrap.indent(line, " " * 4) for line in exc.format(chain=chain))
77+
yield from (
78+
textwrap.indent(line, " " * 4) for line in exc.format(chain=chain)
79+
)
7880

7981

8082
def exceptiongroup_excepthook(etype, value, tb):

exceptiongroup/_tests/test_tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def _match(err):
6565

6666
error1 = RuntimeError("skip")
6767
error2 = RuntimeError("Runtime Error")
68-
group = ExceptionGroup("Many Errors", [error1, error2], ["skip", "Runtime Error"])
68+
group = ExceptionGroup(
69+
"Many Errors", [error1, error2], ["skip", "Runtime Error"]
70+
)
6971
matched, unmatched = split(RuntimeError, group, match=_match)
7072
assert matched.exceptions == [error2]
7173
assert unmatched.exceptions == [error1]

exceptiongroup/_tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def split(exc_type, exc, *, match=None):
2222
value will be tuple of (ExceptionGroup or None, ExceptionGroup or None)
2323
"""
2424
if not isinstance(exc, BaseException):
25-
raise ValueError("Argument `exc` should be an instance of BaseException.")
25+
raise ValueError(
26+
"Argument `exc` should be an instance of BaseException."
27+
)
2628
if isinstance(exc, ExceptionGroup):
2729
matches = []
2830
match_notes = []

0 commit comments

Comments
 (0)