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

Commit f36f486

Browse files
committed
just use .flake8 locally, and make split throw TypeError.
1 parent 4024274 commit f36f486

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

exceptiongroup/_tests/test_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def raise_error_from_another(out_err, another_err):
1616

1717

1818
def test_split_for_none_exception_should_raise_value_error():
19-
with pytest.raises(ValueError):
19+
with pytest.raises(TypeError):
2020
matched, unmatched = split(RuntimeError, None)
2121

2222

exceptiongroup/_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ 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(
25+
raise TypeError(
2626
"Argument `exc` should be an instance of BaseException."
2727
)
2828
if isinstance(exc, ExceptionGroup):

0 commit comments

Comments
 (0)