| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b1c6392 commit d5289fe
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -326,7 +326,14 @@ def display_dict(d, padding): | |||
| 326 | 326 | print('%s: %s' % (obj._id_attr.replace('_', '-'), id)) | |
| 327 | 327 | if hasattr(obj, '_short_print_attr'): | |
| 328 | 328 | value = getattr(obj, obj._short_print_attr) | |
| 329 | - print('%s: %s' % (obj._short_print_attr, value)) | ||
| 329 | + value = value.replace('\r', '').replace('\n', ' ') | ||
| 330 | + # If the attribute is a note (ProjectCommitComment) then we do | ||
| 331 | + # some modifications to fit everything on one line | ||
| 332 | + line = '%s: %s' % (obj._short_print_attr, value) | ||
| 333 | + # ellipsize long lines (comments) | ||
| 334 | + if len(line) > 79: | ||
| 335 | + line = line[:76] + '...' | ||
| 336 | + print(line) | ||
| 330 | 337 | ||
| 331 | 338 | def display_list(self, data, fields, **kwargs): | |
| 332 | 339 | verbose = kwargs.get('verbose', False) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1411,6 +1411,7 @@ def create(self, data, **kwargs): | |||
| 1411 | 1411 | ||
| 1412 | 1412 | class ProjectCommitComment(RESTObject): | |
| 1413 | 1413 | _id_attr = None | |
| 1414 | + _short_print_attr = 'note' | ||
| 1414 | 1415 | ||
| 1415 | 1416 | ||
| 1416 | 1417 | class ProjectCommitCommentManager(ListMixin, CreateMixin, RESTManager): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments