[Mlir-commits] [mlir] [mlir] Add support for broader range of input files in generate-test-checks.py (PR #134327)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Apr 3 17:15:05 PDT 2025
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 HEAD~1...HEAD mlir/utils/generate-test-checks.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- generate-test-checks.py 2025-04-04 00:07:29.000000 +0000
+++ generate-test-checks.py 2025-04-04 00:14:38.258208 +0000
@@ -226,13 +226,13 @@
output_line = ''
components = ATTR_RE.split(line)
for component in components:
m = ATTR_RE.match(component)
# Only use attribute alias if one exists.
- if m and attribute_namer.get_name(m.group(1)) != '?':
- output_line += '#[[' + attribute_namer.get_name(m.group(1)) + ']]'
- output_line += component[len(m.group()):]
+ if m and attribute_namer.get_name(m.group(1)) != "?":
+ output_line += "#[[" + attribute_namer.get_name(m.group(1)) + "]]"
+ output_line += component[len(m.group()) :]
else:
output_line += component
return output_line
# Pre-process a line of input to remove any character sequences that will be
``````````
</details>
https://github.com/llvm/llvm-project/pull/134327
More information about the Mlir-commits
mailing list