From 4ca26365b25c0f682588de9ae07063196a42cde8 Mon Sep 17 00:00:00 2001 From: Scott Pakin Date: Wed, 13 Nov 2024 23:07:41 -0700 Subject: [PATCH] Compare types with "is not" instead of "!=" pycodestyle was complaining about this. --- simpinkscr/simple_inkscape_scripting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpinkscr/simple_inkscape_scripting.py b/simpinkscr/simple_inkscape_scripting.py index 4f2026d..ef1a04c 100644 --- a/simpinkscr/simple_inkscape_scripting.py +++ b/simpinkscr/simple_inkscape_scripting.py @@ -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()