summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-06-12 16:40:35 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-07-05 15:39:00 +0300
commitc9b2f62eddf9ecf6f3e4557050b08bd0c560c693 (patch)
treec8fb0e890e803de03d8c175649f188435eb5882a
parent52579639ce1b17de251fc69619d95d18b93fb377 (diff)
utils: checkstyle: Add __repr__ method to CommitFile class
Add a custom representation to the CommitFile class in order to facilitate debugging. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-xutils/checkstyle.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/checkstyle.py b/utils/checkstyle.py
index 5cc523b6..7da888d8 100755
--- a/utils/checkstyle.py
+++ b/utils/checkstyle.py
@@ -191,6 +191,9 @@ class CommitFile:
else:
self.__filename = info[1]
+ def __repr__(self):
+ return f'{self.__status} {self.__filename}'
+
@property
def filename(self):
return self.__filename