[Github-comments] [geany/geany] Add human-readable representation of tags to unit test results (PR #3051)
Enrico Tröger
notifications at github.com
Sun May 22 13:36:05 UTC 2022
@eht16 commented on this pull request.
> +
+
+def print_tag(tag):
+ res = '{:<12}'.format(tag[TA_TYPE] + ': ')
+ if TA_VARTYPE in tag:
+ res += tag[TA_VARTYPE] + ' '
+ if TA_SCOPE in tag:
+ res += tag[TA_SCOPE] + ' :: '
+ res += tag[TA_NAME]
+ if TA_ARGLIST in tag:
+ res += tag[TA_ARGLIST]
+ if TA_INHERITS in tag:
+ res += ' extends ' + tag[TA_INHERITS]
+ if TA_POINTER in tag and tag[TA_POINTER] > 0:
+ res += ' flags: ' + str(tag[TA_POINTER])
+ sys.stdout.buffer.write(res.encode('utf-8'))
I assume we are using `stdout.buffer` here because we are writing binary data to `stdout` and docs suggest to use `stdout.buffer` in such cases?
If so, maybe a comment could document this so we won't ask ourselves again in a year or so :).
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3051#pullrequestreview-980961844
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3051/review/980961844 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220522/d5f5b882/attachment.htm>
More information about the Github-comments
mailing list