Replace bare excepts with except BaseException

Mostly I wanted to remove uses of `noqa`.

In Python 3 the two are the same.
This commit is contained in:
Ran Benita
2020-04-24 22:15:45 +03:00
parent d1534181c0
commit 59a12e9ab3
6 changed files with 9 additions and 9 deletions

View File

@@ -123,7 +123,7 @@ class ApproxNumpy(ApproxBase):
if not np.isscalar(actual):
try:
actual = np.asarray(actual)
except: # noqa
except BaseException:
raise TypeError("cannot compare '{}' to numpy.ndarray".format(actual))
if not np.isscalar(actual) and actual.shape != self.expected.shape: