Skip to content

Commit

Permalink
Compare types with "is not" instead of "!="
Browse files Browse the repository at this point in the history
pycodestyle was complaining about this.
  • Loading branch information
spakin committed Nov 14, 2024
1 parent 65f68c2 commit 4ca2636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simpinkscr/simple_inkscape_scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,14 @@ def __repr__(self):
def __eq__(self, other):
'''Two SimpleObjects are equal if they encapsulate the same
inkex object.'''
if type(self) != type(other):
if type(self) is not type(other):
return NotImplemented
return self.get_inkex_object() == other.get_inkex_object()

def __ne__(self, other):
'''Two SimpleObjects are unequal if they do not encapsulate the
same inkex object.'''
if type(self) != type(other):
if type(self) is not type(other):
return NotImplemented
return self.get_inkex_object() != other.get_inkex_object()

Expand Down

0 comments on commit 4ca2636

Please sign in to comment.