[llvm] [AMDGPU][test]added remove duplicate options for update_mc_test_check script (PR #111769)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 17:01:15 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 35684fa4bc8d2288d479cb8aa9d275b14bfefead...8a61029d48a6148747f69e4d624a8dd6796189f7 llvm/utils/UpdateTestChecks/common.py llvm/utils/update_mc_test_checks.py
``````````

</details>

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

``````````diff
--- update_mc_test_checks.py	2024-10-16 23:57:04.000000 +0000
+++ update_mc_test_checks.py	2024-10-17 00:00:42.773406 +0000
@@ -47,10 +47,11 @@
         return False
     # skip any CHECK lines.
     elif common.CHECK_RE.match(input_line):
         return False
     return True
+
 
 def isRunLine(l):
     return common.RUN_LINE_RE.match(l)
 
 def hasErr(err):
@@ -335,11 +336,11 @@
             test_units = "\n".join(output_lines).split("\n\n")
 
             # select the key line for each test unit
             test_dic = {}
             for unit in test_units:
-                lines = unit.split('\n')
+                lines = unit.split("\n")
                 for l in lines:
                     # if contains multiple lines, use
                     # the first testline or runline as key
                     if isTestLine(l, mc_mode):
                         test_dic[unit] = l
@@ -363,10 +364,11 @@
                         new_test_units.append(unit)
                 test_units = new_test_units
 
             # sort
             if ti.args.sort:
+
                 def compare(l1, l2):
                     # get key string to be compared
                     l1 = test_dic[l1]
                     l2 = test_dic[l2]
 

``````````

</details>


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


More information about the llvm-commits mailing list