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 origin/main...HEAD
llvm/utils/get_triple_system_name.py llvm/utils/get_triple_system_name_test.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- get_triple_system_name.py 2026-07-10 16:34:45.000000 +0000
+++ get_triple_system_name.py 2026-07-10 16:37:17.872456 +0000
@@ -37,13 +37,11 @@
def find_def_file():
# This script lives in llvm/utils/, the .def in llvm/include/...
llvm_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- return os.path.join(
- llvm_dir, "include", "llvm", "TargetParser", "TripleName.def"
- )
+ return os.path.join(llvm_dir, "include", "llvm", "TargetParser",
"TripleName.def")
def parse(def_path):
names = TripleNames()
with open(def_path) as f:
--- get_triple_system_name_test.py 2026-07-10 16:34:45.000000 +0000
+++ get_triple_system_name_test.py 2026-07-10 16:37:17.923142 +0000
@@ -30,13 +30,11 @@
def _count(self, macro):
# Count real macro invocations, skipping the #define lines.
pat = re.compile(r"^\s*" + macro + r"\(")
return sum(
- 1
- for line in self.lines
- if pat.match(line) and "#define" not in line
+ 1 for line in self.lines if pat.match(line) and "#define" not in
line
)
def test_all_os_rows_parsed(self):
expected = self._count("TRIPLE_OS") + self._count("TRIPLE_OS_ALIAS")
self.assertEqual(len(self.names.os), expected)
``````````
</details>
https://github.com/llvm/llvm-project/pull/208773
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits