From c9b2f62eddf9ecf6f3e4557050b08bd0c560c693 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Jun 2023 16:40:35 +0300 Subject: 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 Reviewed-by: Kieran Bingham --- utils/checkstyle.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'utils/checkstyle.py') 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 -- cgit v1.2.1