forked from Qiskit/rustworkx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Potential fix to the tooltip with special characters bug (Qiskit#1203)
* Potential solution * Push update * Fixed linting issues * Fix to linting issues * minor fix * using serde_json instead of manually escaping * fix import, and added test case * Updated test logic * updated test to check to_dot * fix clippy issues * created release notes * fix release notes * fix linting issue in test * remove unused import * fixing quotes issue * fixing "\" issue and updating tests * updating more test to have quotes * Update dot_utils.rs * Apply suggestions from code review * Collect vector of results in Rust * Fix error handling * Update releasenotes/notes/fix-graphviz-draw-tooltip-3f697d71c4b79e60.yaml * Update releasenotes/notes/fix-graphviz-draw-tooltip-3f697d71c4b79e60.yaml * Update releasenotes/notes/fix-graphviz-draw-tooltip-3f697d71c4b79e60.yaml --------- Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
- Loading branch information
1 parent
77474a2
commit 70b7126
Showing
5 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
releasenotes/notes/fix-graphviz-draw-tooltip-3f697d71c4b79e60.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
fixes: | ||
- | | ||
:func:`.graphviz_draw` can now handle special characters | ||
.. jupyter-execute:: | ||
import rustworkx as rx | ||
from rustworkx.visualization import graphviz_draw | ||
graphviz_draw( | ||
rx.generators.path_graph(2), | ||
node_attr_fn=lambda x: {"label": "the\nlabel", "tooltip": "the\ntooltip"}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters