From dd15f79ab860c08889d37f3a23572601ba06b8f2 Mon Sep 17 00:00:00 2001 From: Robert Alonso <17463757+rgalonso@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:53:48 +0000 Subject: [PATCH] feat: add ability to print Issue object Facilitates debug and error handling --- Issue.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Issue.py b/Issue.py index 8a79d37..b7c8e6e 100644 --- a/Issue.py +++ b/Issue.py @@ -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) \ No newline at end of file