[llvm] [LLVM-Reduce] - Distinct Metadata Reduction (PR #96072)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 03:12:36 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 4d6b9921b3801709dca9245b5b4d7c17944a036f...211101936383973e0895f8ca1570c4b52acab335 llvm/test/tools/llvm-reduce/Inputs/reduce-distinct-metadata.py llvm/test/tools/llvm-reduce/Inputs/remove-metadata.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- reduce-distinct-metadata.py 2024-06-19 13:48:15.000000 +0000
+++ reduce-distinct-metadata.py 2024-06-20 10:12:10.486785 +0000
@@ -3,17 +3,17 @@
import sys
import re
input = open(sys.argv[1], "r").read().splitlines()
-depth_map = {"0": 1, "1": 3, "2": 3, "3": 2, "4" : 1}
+depth_map = {"0": 1, "1": 3, "2": 3, "3": 2, "4": 1}
for i in range(len(depth_map)):
- counter = 0
- for line in input:
- if re.match(rf".*interesting_{i}.*", line) != None:
- counter += 1
- if counter != depth_map[str(i)]:
- sys.exit(1)
+ counter = 0
+ for line in input:
+ if re.match(rf".*interesting_{i}.*", line) != None:
+ counter += 1
+ if counter != depth_map[str(i)]:
+ sys.exit(1)
sys.exit(0)
``````````
</details>
https://github.com/llvm/llvm-project/pull/96072
More information about the llvm-commits
mailing list