Skip to content

Commit

Permalink
contrib/bst-graph: Use raw string for regex
Browse files Browse the repository at this point in the history
Without raw string I see `SyntaxWarning: invalid escape sequence '\|'`.
  • Loading branch information
harrysarson committed Feb 6, 2025
1 parent 6af9a5b commit 655e658
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/bst-graph
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ def main():
graph_lines = subprocess.check_output(cmd, universal_newlines=True)
# NOTE: We generate nodes and edges before giving them to graphviz as
# the library does not de-deuplicate them.
nodes, build_deps, runtime_deps = parse_graph(re.split("\|\|", graph_lines))
nodes, build_deps, runtime_deps = parse_graph(re.split(r"\|\|", graph_lines))
graph = generate_graph(nodes, build_deps, runtime_deps)

print(graph.source)

if args.format:
graph.render(cleanup=True,
filename='bst-graph',
Expand Down

0 comments on commit 655e658

Please sign in to comment.