mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] add noqa for flake8 rule B036: found except BaseException
without re-raising (#159043)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/159043 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
4261e26a8b
commit
f903bc475c
@ -3324,7 +3324,7 @@ class TestCase(expecttest.TestCase):
|
||||
def wrapper(*args, **kwargs):
|
||||
try:
|
||||
f(*args, **kwargs)
|
||||
except BaseException as e:
|
||||
except BaseException as e: # noqa: B036
|
||||
self.skipTest(e)
|
||||
raise RuntimeError(f"Unexpected success, please remove `{file_name}`")
|
||||
return wrapper
|
||||
@ -3346,7 +3346,7 @@ class TestCase(expecttest.TestCase):
|
||||
def wrapper(*args, **kwargs):
|
||||
try:
|
||||
f(*args, **kwargs)
|
||||
except BaseException as e:
|
||||
except BaseException as e: # noqa: B036
|
||||
self.skipTest(e)
|
||||
method = getattr(self, self._testMethodName)
|
||||
if getattr(method, "__unittest_expecting_failure__", False):
|
||||
|
Reference in New Issue
Block a user