[llvm] Make update_any_test_check.py script accepting @listfile CL argument. (PR #86800)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 05:48:58 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r e82765bf07a978674c0e75c8b2e20f154ae24a4c...76653ab7846e08ab5baabd0b1a9d60f00785bb20 llvm/utils/update_any_test_checks.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- update_any_test_checks.py	2024-03-27 12:42:14.000000 +0000
+++ update_any_test_checks.py	2024-03-27 12:48:30.359730 +0000
@@ -38,22 +38,24 @@
     result = subprocess.run(
         [utc_tool, testname], stdout=subprocess.PIPE, stderr=subprocess.PIPE
     )
     return (result.returncode, result.stdout, result.stderr)
 
+
 def read_arguments_from_file(filename):
     try:
-        with open(filename, 'r') as file:
+        with open(filename, "r") as file:
             return [line.rstrip() for line in file.readlines()]
     except FileNotFoundError:
         print(f"Error: File '{filename}' not found.")
         sys.exit(1)
 
+
 def expand_listfile_args(arg_list):
     exp_arg_list = []
     for arg in arg_list:
-        if arg.startswith('@'):
+        if arg.startswith("@"):
             exp_arg_list += read_arguments_from_file(arg[1:])
         else:
             exp_arg_list.append(testname)
     return exp_arg_list
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/86800


More information about the llvm-commits mailing list