feat: add ability to print Issue object

Facilitates debug and error handling
This commit is contained in:
Robert Alonso 2024-11-11 17:53:48 +00:00
parent e42bca636e
commit dd15f79ab8

View File

@ -19,3 +19,9 @@ class Issue(object):
self.issue_url = issue_url
self.issue_number = issue_number
def __str__(self):
selflist = []
for key in [x for x in vars(self).keys() if x not in ("hunk")]:
selflist.append(f'"{key}": "{getattr(self, key)}"')
selflist.append((f'"hunk": "{self.hunk}"'))
return '\n'.join(selflist)