File tree Expand file tree Collapse file tree
python/tools/recorded-call-graph-metrics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929import dis
3030import dataclasses
3131import csv
32- import xml .etree .ElementTree as ET
32+ import xml .etree .ElementTree as etree
3333
3434# Copy-Paste and uncomment for interactive ipython sessions
3535# import IPython; IPython.embed(); sys.exit()
@@ -168,19 +168,19 @@ class XMLExporter(Exporter):
168168 @staticmethod
169169 def export (recorded_calls , outfile_path ):
170170
171- root = ET .Element ('root' )
171+ root = etree .Element ('root' )
172172
173173 for (call , callee ) in sorted (recorded_calls ):
174174 data = {
175175 ** Exporter .dataclass_to_dict (call ),
176176 ** Exporter .dataclass_to_dict (callee )
177177 }
178178
179- rc = ET .SubElement (root , 'recorded_call' )
179+ rc = etree .SubElement (root , 'recorded_call' )
180180 # this xml library only supports serializing attributes that have string values
181181 rc .attrib = {k : str (v ) for k , v in data .items ()}
182182
183- tree = ET .ElementTree (root )
183+ tree = etree .ElementTree (root )
184184 tree .write (outfile_path , encoding = 'utf-8' )
185185
186186
You can’t perform that action at this time.
0 commit comments