Skip to content

Commit

Permalink
for the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
damies13 committed Sep 6, 2023
1 parent 623225d commit 0139fee
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions rfswarm_reporter/rfswarm_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,6 @@ def rt_errors_set_sql(self, id, tableSQL):

def rt_errors_generate_sql(self, id):
base.debugmsg(8, "id:", id)
display_percentile = base.rs_setting_get_pctile()
sql = ""

sql += "SELECT "
Expand Down Expand Up @@ -1847,7 +1846,7 @@ def rt_errors_get_data(self, id):
base.reportdata[id][rid] = rowi
if rid in base.reportdata[id] and "error" not in base.reportdata[id][rid]:
base.rt_errors_parse_xml(id, rid)
base.debugmsg(5, "base.reportdata[",id,"]:", base.reportdata[id])
base.debugmsg(5, "base.reportdata[", id, "]:", base.reportdata[id])
return base.reportdata[id]

def rt_errors_parse_xml(self, id, rid):
Expand Down Expand Up @@ -1883,7 +1882,7 @@ def rt_errors_parse_xml(self, id, rid):

# tree = etree.parse(xmlf)
with open(xmlf, 'rb') as xml_file:
tree = etree.parse(xml_file)
tree = etree.parse(xml_file)
root = tree.getroot()
base.debugmsg(9, "root:", root)

Expand All @@ -1893,12 +1892,7 @@ def rt_errors_parse_xml(self, id, rid):
source = suites[0].get('source')
base.debugmsg(8, "source:", source)


# //kw/status[@status='FAIL']/../msg[@level='FAIL']
# failmsgs = root.findall(".//kw/status[@status='FAIL']/../msg[@level='FAIL']")
# base.debugmsg(5, "failmsgs:", failmsgs)
# failmsg = failmsgs[-1]
# base.debugmsg(5, "failmsg:", failmsg, failmsg.text)

failkws = root.findall(".//kw/status[@status='FAIL']/..")
base.debugmsg(9, "failkws:", failkws)
Expand All @@ -1913,6 +1907,7 @@ def rt_errors_parse_xml(self, id, rid):
# //kw/status[@status='FAIL']/../msg[@level='INFO' and @html='true']
# </td></tr><tr><td colspan="3"><a href="selenium-screenshot-1.png"><img src="selenium-screenshot-1.png" width="800px"></a>
# infomsg = failkw.find("msg[@level='INFO' and @html='true']")

infomsg = failkw.find("msg[@html='true']")
if infomsg is not None:
base.debugmsg(5, "infomsg:", infomsg, infomsg.text)
Expand All @@ -1930,8 +1925,6 @@ def rt_errors_parse_xml(self, id, rid):
base.reportdata[id][rid]['image'] = image
base.reportdata[id][rid]['image_file'] = imagef


# FR FilterResult
def rt_table_get_fr(self, id):
base.debugmsg(9, "id:", id)
if 'FilterResult' in base.report[id]:
Expand Down Expand Up @@ -7147,7 +7140,6 @@ def cs_graph_switchdt(self, _event=None):
self.contentdata[idl]["Frames"][datatypel].grid(column=0, row=self.contentdata[id]["DTFrame"], columnspan=100, sticky="nsew")
self.contentdata[idr]["Frames"][datatyper].grid(column=0, row=self.contentdata[id]["DTFrame"], columnspan=100, sticky="nsew")


#
# Settings - Error Details
#
Expand Down Expand Up @@ -7178,7 +7170,6 @@ def cs_errors(self, id):
self.contentdata[id]["intGroup"].set(group)
self.contentdata[id]["chkGroup"].grid(column=1, row=rownum, sticky="nsew")


def cs_errors_update(self, _event=None, *args):
base.debugmsg(5, "_event:", _event, " args:", args)
changes = 0
Expand All @@ -7204,7 +7195,6 @@ def cs_errors_update(self, _event=None, *args):
cp = threading.Thread(target=lambda: self.content_preview(id))
cp.start()


#
# Preview
#
Expand Down Expand Up @@ -7864,15 +7854,12 @@ def cp_errors(self, id):
edata = base.rt_errors_get_data(id)
self.contentdata[id]['data'] = edata

base.debugmsg(5, "self.contentdata[",id,"]['data']:", self.contentdata[id]['data'])




base.debugmsg(5, "self.contentdata[", id, "]['data']:", self.contentdata[id]['data'])

#
# Export content generation functions
#

def cg_export_xhtml(self):
# base.debugmsg(5, "Not implimented yet.....")
core.export_xhtml()
Expand Down

0 comments on commit 0139fee

Please sign in to comment.