mirror of
https://github.com/safishamsi/graphify.git
synced 2026-10-19 18:31:13 +00:00
fix(robot): namespace the external-library stub id to avoid keyword collision (#3192)
A user keyword named like an imported library (e.g. a keyword 'SeleniumLibrary') would mint the same id as the library stub. Namespace the stub id under robot_library so the two cannot collide; the display label keeps the raw library name.
This commit is contained in:
1 parent
832256f824
commit
43e63b1c3f
1 file changed
+4
-1
@@ -211,7 +211,10 @@ def extract_robot(path: Path) -> dict:
|
||||
elif raw not in _ROBOT_STDLIBS:
|
||||
# External library (SeleniumLibrary, RequestsLibrary, ...) -
|
||||
# stub node so suites sharing a library cluster together.
|
||||
nid = _make_id(raw)
|
||||
# Namespace the id so a user keyword that happens to share the
|
||||
# library's name cannot collide with this stub (the label keeps
|
||||
# the raw library name for display).
|
||||
nid = _make_id("robot_library", raw)
|
||||
add_node(nid, raw, node.lineno)
|
||||
add_edge(file_nid, nid, "imports", node.lineno)
|
||||
|
||||
|
||||
Reference in new issue
Block a user