diff --git a/tools/lint-hotkeys b/tools/lint-hotkeys index 5ae1363923..1b2fd4c2b3 100755 --- a/tools/lint-hotkeys +++ b/tools/lint-hotkeys @@ -73,7 +73,9 @@ def lint_hotkeys_file() -> None: else: print("No hotkeys linting errors") if not output_file_matches_string(hotkeys_file_string): - print(f"Run './tools/{SCRIPT_NAME}' to update {OUTPUT_FILE_NAME} file") + print( + f"Run './tools/{SCRIPT_NAME} --fix' to update {OUTPUT_FILE_NAME} file" + ) error_flag = 1 sys.exit(error_flag) @@ -118,6 +120,10 @@ def get_hotkeys_file_string() -> str: def output_file_matches_string(hotkeys_file_string: str) -> bool: + """ + Read the content of the existing OUTPUT_FILE as a string + and check if it matches the newly generated hotkeys_file_string + """ with open(OUTPUT_FILE) as output_file: content_is_identical = hotkeys_file_string == output_file.read() if content_is_identical: