diff options
| author | Duncan Ogilvie <mr.exodia.tpodt@gmail.com> | 2024-01-06 18:08:46 +0100 |
|---|---|---|
| committer | Duncan Ogilvie <mr.exodia.tpodt@gmail.com> | 2024-01-06 18:37:17 +0100 |
| commit | ad82438c448597b0c6470eef697a2c1b5f721ef1 (patch) | |
| tree | c758ce65f158c8d05b3066e15cb43d8ac81cfda5 /test/analysis/depgraph.py | |
| parent | 0b0de2cbd1a5949cd8819899169446c5cf524cc3 (diff) | |
| download | miasm-ad82438c448597b0c6470eef697a2c1b5f721ef1.tar.gz miasm-ad82438c448597b0c6470eef697a2c1b5f721ef1.zip | |
Use regex literals for re.* functions
Diffstat (limited to 'test/analysis/depgraph.py')
| -rw-r--r-- | test/analysis/depgraph.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/analysis/depgraph.py b/test/analysis/depgraph.py index 57a73a5f..9760e717 100644 --- a/test/analysis/depgraph.py +++ b/test/analysis/depgraph.py @@ -108,7 +108,7 @@ class IRATest(LifterModelCall): def bloc2graph(irgraph, label=False, lines=True): """Render dot graph of @blocks""" - escape_chars = re.compile('[' + re.escape('{}') + ']') + escape_chars = re.compile(r'[\{\}]') label_attr = 'colspan="2" align="center" bgcolor="grey"' edge_attr = 'label = "%s" color="%s" style="bold"' td_attr = 'align="left"' @@ -179,7 +179,7 @@ def bloc2graph(irgraph, label=False, lines=True): def dg2graph(graph, label=False, lines=True): """Render dot graph of @blocks""" - escape_chars = re.compile('[' + re.escape('{}') + ']') + escape_chars = re.compile(r'[\{\}]') label_attr = 'colspan="2" align="center" bgcolor="grey"' edge_attr = 'label = "%s" color="%s" style="bold"' td_attr = 'align="left"' |