[Mlir-commits] [mlir] [python] Fix loc_tracebacks() (PR #170831)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Dec 5 02:43:36 PST 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 origin/main...HEAD mlir/python/mlir/ir.py mlir/test/python/ir/auto_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
--- test/python/ir/auto_location.py	2025-12-05 10:37:21.000000 +0000
+++ test/python/ir/auto_location.py	2025-12-05 10:43:06.121871 +0000
@@ -31,11 +31,10 @@
         # fmt: on
         print(op.location)
 
         # Test nesting of loc_tracebacks().
         with loc_tracebacks():
-        
             # fmt: off
             # CHECK: loc(callsite("ConstantOp.__init__"("{{.*}}[[SEP]]mlir[[SEP]]dialects[[SEP]]arith.py":65:12 to :76) at callsite("constant"("{{.*}}[[SEP]]mlir[[SEP]]dialects[[SEP]]arith.py":110:40 to :81) at callsite("testInferLocations"("{{.*}}[[SEP]]test[[SEP]]python[[SEP]]ir[[SEP]]auto_location.py":{{[0-9]+}}:14 to :48) at callsite("run"("{{.*}}[[SEP]]test[[SEP]]python[[SEP]]ir[[SEP]]auto_location.py":{{[0-9]+}}:4 to :7) at "<module>"("{{.*}}[[SEP]]test[[SEP]]python[[SEP]]ir[[SEP]]auto_location.py":{{[0-9]+}}:1 to :4))))))
             # fmt: on
             print(one.location)
 

``````````

</details>


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


More information about the Mlir-commits mailing list