This code is mostly from the pytest plugin. If you want to tidy this up I would suggest making it compliant with gjslint. As this is not alongside our atoms, and is only related to the HTML report I don't think a tidy up here should block the merge.