From 481865ba34b5f8e688c738f700c420dedcfc784e Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Wed, 18 Feb 2026 14:27:21 -0800 Subject: [PATCH] Run linter on run_compatibility_test.py. --- .../run_compatibility_test.py | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/tests/compatibility_test/run_compatibility_test.py b/tests/compatibility_test/run_compatibility_test.py index f3e6310bc2..cb898f63ca 100755 --- a/tests/compatibility_test/run_compatibility_test.py +++ b/tests/compatibility_test/run_compatibility_test.py @@ -36,19 +36,17 @@ def generate_test_data_files(reftag: str): gdextension_reference_json = download_gdextension_api(reftag) with open(CLASS_METHODS_FILE, "w") as classes_file: - classes_file.writelines( - [ - f"{klass['name']} {func['name']} {func['hash']}\n" - for (klass, func) in itertools.chain( - ( - (klass, method) - for klass in gdextension_reference_json["classes"] - for method in klass.get("methods", []) - if not method.get("is_virtual") - ), - ) - ] - ) + classes_file.writelines([ + f"{klass['name']} {func['name']} {func['hash']}\n" + for (klass, func) in itertools.chain( + ( + (klass, method) + for klass in gdextension_reference_json["classes"] + for method in klass.get("methods", []) + if not method.get("is_virtual") + ), + ) + ]) variant_types: dict[str, int] | None = None for global_enum in gdextension_reference_json["global_enums"]: @@ -63,18 +61,16 @@ def generate_test_data_files(reftag: str): return with open(BUILTIN_METHODS_FILE, "w") as f: - f.writelines( - [ - f"{variant_types[klass['name'].lower()]} {func['name']} {func['hash']}\n" - for (klass, func) in itertools.chain( - ( - (klass, method) - for klass in gdextension_reference_json["builtin_classes"] - for method in klass.get("methods", []) - ), - ) - ] - ) + f.writelines([ + f"{variant_types[klass['name'].lower()]} {func['name']} {func['hash']}\n" + for (klass, func) in itertools.chain( + ( + (klass, method) + for klass in gdextension_reference_json["builtin_classes"] + for method in klass.get("methods", []) + ), + ) + ]) with open(UTILITY_FUNCTIONS_FILE, "w") as f: f.writelines([f"{func['name']} {func['hash']}\n" for func in gdextension_reference_json["utility_functions"]])