Skip to content

Commit

Permalink
clean up dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
berquist committed Oct 16, 2024
1 parent 118d49c commit c7dd886
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions sort_regressionfiles_yaml.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#!/usr/bin/env python


# import yaml


# class IndentDumper(yaml.SafeDumper):
# def increase_indent(self, flow=False, indentless=False):
# return super(IndentDumper, self).increase_indent(flow, False)


if __name__ == "__main__":
import sys
import subprocess as sp
Expand All @@ -20,17 +12,14 @@
yaml.indent(mapping=2, sequence=4, offset=2)

with open("regressionfiles.yaml", encoding="utf-8") as handle:
# contents = yaml.load(handle, Loader=yaml.SafeLoader)
contents = yaml.load(handle)

contents_sorted = {"regressions": sorted(contents["regressions"], key=lambda x: x["loc_entry"])}

with open("regressionfiles_nocomments.yaml", "w", encoding="utf-8") as handle:
# yaml.dump(contents, handle, Dumper=IndentDumper, allow_unicode=True)
yaml.dump(contents, handle)

with open("regressionfiles_sorted.yaml", "w", encoding="utf-8") as handle:
# yaml.dump(contents_sorted, handle, Dumper=IndentDumper, allow_unicode=True)
yaml.dump(contents_sorted, handle)

result = sp.run(
Expand Down

0 comments on commit c7dd886

Please sign in to comment.