Add some __eq__

Needed as 088eea7 adds comparison of elements this makes sure that they
are compared by value instead of by reference.
pull/568/head
Jochen Sprickerhof 2023-10-09 14:13:02 +02:00
rodzic 974d511ceb
commit 759f98388a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 5BFFDCC258E69433
2 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -28,6 +28,8 @@ Bug fixes:
[jacadzaca]
- Use non legacy timezone name.
Ref: #567
- Add some compare functions.
Ref: #568
5.0.10 (unreleased)
-------------------

Wyświetl plik

@ -257,6 +257,11 @@ class vDDDLists:
out.append(vDDDTypes.from_ical(ical_dt, timezone=timezone))
return out
def __eq__(self, other):
if not isinstance(other, vDDDLists):
return False
return self.dts == other.dts
class vCategory:
@ -865,6 +870,11 @@ class vUTCOffset:
return -offset
return offset
def __eq__(self, other):
if not isinstance(other, vUTCOffset):
return False
return self.td == other.td
class vInline(str):
"""This is an especially dumb class that just holds raw unparsed text and