Skip to content

Commit e753fd4

Browse files
quieten flake8 E722 (#417)
1 parent 69eb868 commit e753fd4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dpctl/tensor/numpy_usm_shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def _isdef(x):
359359
try:
360360
the_code = compile(new_func, "__init__", "exec")
361361
exec(the_code)
362-
except:
362+
except Exception:
363363
print("Failed to exec type propagation", cname)
364364
pass
365365

dpctl/tests/test_sycl_usm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def test_suai_non_contig_1D(self):
266266
MemoryUSMClass = MemoryUSMShared
267267
try:
268268
buf = MemoryUSMClass(32)
269-
except:
269+
except Exception:
270270
self.skipTest("MemoryUSMShared could not be allocated")
271271
host_canary = np.full((buf.nbytes,), 77, dtype="|u1")
272272
buf.copy_from_host(host_canary)
@@ -294,7 +294,7 @@ def test_suai_non_contig_2D(self):
294294
MemoryUSMClass = MemoryUSMDevice
295295
try:
296296
buf = MemoryUSMClass(20)
297-
except:
297+
except Exception:
298298
self.skipTest("MemoryUSMShared could not be allocated")
299299
host_canary = np.arange(20, dtype="|u1")
300300
buf.copy_from_host(host_canary)

examples/python/subdevices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def subdivide_by_affinity(affinity="numa"):
7272
len(sub_devs), [d.max_compute_units for d in sub_devs]
7373
)
7474
)
75-
except:
75+
except Exception:
7676
print("Device partitioning by affinity was not successful.")
7777

7878

0 commit comments

Comments
 (0)