diff --git a/conservancy_beancount/rtutil.py b/conservancy_beancount/rtutil.py index 0d87b9d..db2a5e2 100644 --- a/conservancy_beancount/rtutil.py +++ b/conservancy_beancount/rtutil.py @@ -100,8 +100,9 @@ class RT: def exists(self, ticket_id: RTId, attachment_id: Optional[RTId]=None) -> bool: return self.url(ticket_id, attachment_id) is not None - def parse(self, s: str) -> Optional[Tuple[str, Optional[str]]]: - for regexp in self.PARSE_REGEXPS: + @classmethod + def parse(cls, s: str) -> Optional[Tuple[str, Optional[str]]]: + for regexp in cls.PARSE_REGEXPS: match = regexp.match(s) if match is not None: ticket_id, attachment_id = match.groups()