[Mlir-commits] [mlir] [mlir][Python] Downcast location returned from diagnostic (PR #201337)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jun 3 05:16:28 PDT 2026
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 mlir/test/python/ir/location.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
--- location.py 2026-06-03 12:04:47.000000 +0000
+++ location.py 2026-06-03 12:15:54.233463 +0000
@@ -295,10 +295,11 @@
# CHECK-LABEL: TEST: testLocationFromDiagnostic
def testLocationFromDiagnostic():
with Context() as ctx:
+
def callback(d):
assert isinstance(d.location, FileLineColLoc)
assert isinstance(d.location, Location)
# CHECK: filename: diagnostic_test.txt
``````````
</details>
https://github.com/llvm/llvm-project/pull/201337
More information about the Mlir-commits
mailing list