summaryrefslogtreecommitdiff
path: root/utils/checkstyle.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/checkstyle.py')
-rwxr-xr-xutils/checkstyle.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/checkstyle.py b/utils/checkstyle.py
index 2b1e1f6c..c9e41d41 100755
--- a/utils/checkstyle.py
+++ b/utils/checkstyle.py
@@ -248,6 +248,17 @@ class Commit:
stdout=subprocess.PIPE).stdout.decode('utf-8')
self._files = [CommitFile(f) for f in ret.splitlines()]
+ def __repr__(self):
+ return '\n'.join([
+ f'commit {self.commit}',
+ f'Author: {self.author}',
+ f'',
+ f' {self.title}',
+ '',
+ '\n'.join([line and f' {line}' or '' for line in self._body]),
+ 'Trailers:',
+ ] + self.trailers)
+
def files(self, filter='AMR'):
return [f.filename for f in self._files if f.status in filter]