[libcamera-devel] [PATCH v1 1/4] utils: checkstyle: Add __repr__ method to CommitFile class

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jun 13 00:47:48 CEST 2023


Add a custom representation to the CommitFile class in order to
facilitate debugging.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 utils/checkstyle.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utils/checkstyle.py b/utils/checkstyle.py
index 5cc523b6fba3..7da888d8c365 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
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list