Skip to content

Commit

Permalink
Merge pull request #568 from jspricke/fix_compare
Browse files Browse the repository at this point in the history
  • Loading branch information
niccokunzmann authored Oct 12, 2023
2 parents 974d511 + 759f983 commit 06d6788
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Bug fixes:
[jacadzaca]
- Use non legacy timezone name.
Ref: #567
- Add some compare functions.
Ref: #568

5.0.10 (unreleased)
-------------------
Expand Down
10 changes: 10 additions & 0 deletions src/icalendar/prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ def from_ical(ical, timezone=None):
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:

Expand Down Expand Up @@ -865,6 +870,11 @@ def from_ical(cls, ical):
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
Expand Down

0 comments on commit 06d6788

Please sign in to comment.