Skip to content

Commit 655e658

Browse files
committed
contrib/bst-graph: Use raw string for regex
Without raw string I see `SyntaxWarning: invalid escape sequence '\|'`.
1 parent 6af9a5b commit 655e658

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/bst-graph

+3-1
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ def main():
133133
graph_lines = subprocess.check_output(cmd, universal_newlines=True)
134134
# NOTE: We generate nodes and edges before giving them to graphviz as
135135
# the library does not de-deuplicate them.
136-
nodes, build_deps, runtime_deps = parse_graph(re.split("\|\|", graph_lines))
136+
nodes, build_deps, runtime_deps = parse_graph(re.split(r"\|\|", graph_lines))
137137
graph = generate_graph(nodes, build_deps, runtime_deps)
138+
138139
print(graph.source)
140+
139141
if args.format:
140142
graph.render(cleanup=True,
141143
filename='bst-graph',

0 commit comments

Comments
 (0)