Skip to content

Commit

Permalink
Make pylink happy
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Jan 15, 2025
1 parent dd34630 commit a7bd5d8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 41 deletions.
40 changes: 0 additions & 40 deletions scripts/ids-to-yaml.py

This file was deleted.

34 changes: 34 additions & 0 deletions scripts/ids_to_yaml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python3

import argparse
import yaml


def main():
parser = argparse.ArgumentParser(description="Convert a list of items into a structured YAML format.")
parser.add_argument("input_file", help="Path to the IDS list.")
parser.add_argument("doc_value", help="IDS filename to display in tooltips")
parser.add_argument("output_file", help="Path to the output YAML file.")

args = parser.parse_args()

with open(args.input_file, "r", encoding="utf-8") as file:
lines = file.readlines()

data = []
for line in lines:
line = line.strip()
if line: # Skip empty lines
parts = line.split()
if len(parts) == 2:
value, name = parts
data.append({"name": name, "detail": value, "doc": args.doc_value})

with open(args.output_file, "w", encoding="utf-8") as file:
yaml.dump(data, file, default_flow_style=False, sort_keys=False)

print(f"Output written to {args.output_file}")


if __name__ == "__main__":
main()
3 changes: 2 additions & 1 deletion scripts/iesdp_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ def sanitise(self):
definition_items = {**definition_items, **new_definition_items}

pod.append_offsets(offsets, prefix)
prefix_dir = get_format_version(ff)
# This is not a constant, and doesn't need UPPERCASE
prefix_dir = get_format_version(ff) # pylint: disable=invalid-name
dump_definition(prefix_dir, definition_items, IELIB_STRUCTURES_DIR)

# feature block
Expand Down

0 comments on commit a7bd5d8

Please sign in to comment.