Skip to content

Commit 1cc45e4

Browse files
authored
flake8 6.1.0 linting fix: changed comparisons between types to use is keyword (#1312)
1 parent 45ed4d5 commit 1cc45e4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/generate_rst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _is_class_property(o):
170170
Returns:
171171
[type]: [description]
172172
"""
173-
return isinstance(o, property) or (type(o) == _getset_descriptor)
173+
return isinstance(o, property) or (type(o) is _getset_descriptor)
174174

175175

176176
def _is_class_method(o):

dpctl/tests/test_sycl_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,4 @@ def test_cpython_api_SyclEvent_Make():
275275
make_e_fn = callable_maker(make_e_fn_ptr)
276276

277277
ev2 = make_e_fn(ev.addressof_ref())
278-
assert type(ev) == type(ev2)
278+
assert type(ev) is type(ev2)

dpctl/tests/test_sycl_usm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_pickling(memory_ctor):
169169
mobj.copy_from_host(host_src_obj)
170170

171171
mobj_reconstructed = pickle.loads(pickle.dumps(mobj))
172-
assert type(mobj) == type(
172+
assert type(mobj) is type(
173173
mobj_reconstructed
174174
), "Pickling should preserve type"
175175
assert (

0 commit comments

Comments
 (0)