aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2023-11-09 12:32:15 +0100
committerMartin Vilcans <martin@librador.com>2023-11-09 12:32:15 +0100
commitf09fde100842275b7fff224db16f44ccd186a292 (patch)
treee7fa22454e589c5976d60c90b05a4c74ae87759e
parentcf056eab7f1f739852574d5e81411321f2abd4f2 (diff)
downloadscreenplain-f09fde100842275b7fff224db16f44ccd186a292.tar.gz
Compare types with isinstance - gets rid of warning
-rw-r--r--screenplain/richstring.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/screenplain/richstring.py b/screenplain/richstring.py
index 8a11fec..74098a2 100644
--- a/screenplain/richstring.py
+++ b/screenplain/richstring.py
@@ -70,13 +70,13 @@ class RichString(object):
def __eq__(self, other):
return (
- type(self) == type(other) and
+ isinstance(other, RichString) and
self.segments == other.segments
)
def __ne__(self, other):
return (
- type(self) != type(other) or
+ isinstance(other, RichString) and
self.segments != other.segments
)