[Github-comments] [geany/geany] Add human-readable representation of tags to unit test results (PR #3051)
Jiří Techet
notifications at github.com
Sun May 22 20:58:27 UTC 2022
@techee 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?
To be precise, after a failed attempt to write to stdout normally and trying to figure out what I was doing wrong, yes :-).
> If so, maybe a comment could document this so we won't ask ourselves again in a year or so :).
Will do.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3051#discussion_r878925018
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3051/review/981016504 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220522/60359c1c/attachment.htm>
More information about the Github-comments
mailing list