Core: add an is_event property to Item to match the one on Location (#3401)

This commit is contained in:
Aaron Wagener
2025-04-05 09:07:06 -07:00
committed by GitHub
parent 7bdaaa25c1
commit 5c162bd7ce

View File

@@ -1416,6 +1416,10 @@ class Item:
def flags(self) -> int:
return self.classification.as_flag()
@property
def is_event(self) -> bool:
return self.code is None
def __eq__(self, other: object) -> bool:
if not isinstance(other, Item):
return NotImplemented