harrysarson commented on code in PR #1979:
URL: https://github.com/apache/buildstream/pull/1979#discussion_r1944769051
##########
contrib/bst-graph:
##########
@@ -55,6 +56,10 @@ def parse_args():
return parser.parse_args()
+def escape(s):
+ return urllib.parse.quote_plus(s.encode())
Review Comment:
> Can you please add a small comment that URI percent-encoding is used to
generate unique identifiers that don't contain colons or backslashes?
Added a small comment, also renamed the `escape` function to
`unique_node_name`. Hopefully that makes the intent easier to grok for readers.
> Also, is the .encode() part actually necessary? urllib.parse.quote_plus()
accepts strings and the default encoding is utf-8, so it seems to me that
.encode() is redundant, or am I missing something?
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]