Skip to content

Commit be2600e

Browse files
[pylint] Noqa a false positive with dynamic exception handling
1 parent 410a052 commit be2600e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/python_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ def validate_exc(exc: type[E]) -> type[E]:
10171017
raise TypeError(f"{func!r} object (type: {type(func)}) must be callable")
10181018
try:
10191019
func(*args[1:], **kwargs)
1020-
except expected_exceptions as e:
1020+
except expected_exceptions as e: # pylint: disable=catching-non-exception
10211021
return _pytest._code.ExceptionInfo.from_exception(e)
10221022
fail(message)
10231023

0 commit comments

Comments
 (0)