Skip to content

Commit d8beb90

Browse files
alexfiklinducer
authored andcommitted
fix type comparison
1 parent d9881cd commit d8beb90

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

sumpy/expansion/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def __len__(self):
225225

226226
def __eq__(self, other):
227227
return (
228-
type(self) == type(other)
228+
type(self) is type(other)
229229
and self.kernel == other.kernel
230230
and self.order == other.order
231231
and self.use_rscale == other.use_rscale)

sumpy/expansion/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def update_persistent_hash(self, key_hash, key_builder):
7070

7171
def __eq__(self, other):
7272
return (
73-
type(self) == type(other)
73+
type(self) is type(other)
7474
and self.kernel == other.kernel
7575
and self.order == other.order
7676
and self.use_rscale == other.use_rscale

sumpy/kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def name(self):
102102
def __eq__(self, other):
103103
if id(self) == id(other):
104104
return True
105-
if not type(self) == KernelArgument:
105+
if type(self) is not KernelArgument:
106106
return NotImplemented
107-
if not type(other) == KernelArgument:
107+
if type(other) is not KernelArgument:
108108
return NotImplemented
109109
return self.loopy_arg == other.loopy_arg
110110

0 commit comments

Comments
 (0)