[Lldb-commits] [lldb] [lldb][test] Remove compiler version check and use regex (PR #123393)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 17 12:17:07 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 6b048aeaf837e0e16fece94610f0871d17cefe4c...1d4160e68221ff90a7d01ab58f88eeb599882ef9 lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py	2025-01-17 20:03:54.000000 +0000
+++ vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py	2025-01-17 20:16:33.906402 +0000
@@ -34,15 +34,17 @@
             ValueCheck(name="current"),
         ]
 
         self.expect(
             "expr a",
-            patterns=["""\(std::vector<Foo(, std::allocator<Foo> )*>\) \$0 = size=3 \{
+            patterns=[
+                """\(std::vector<Foo(, std::allocator<Foo> )*>\) \$0 = size=3 \{
   \[0\] = \(a = 3\)
   \[1\] = \(a = 1\)
   \[2\] = \(a = 2\)
-\}"""]
+\}"""
+            ],
         )
 
         self.expect_expr("a.size()", result_type=size_type, result_value="3")
         self.expect_expr("a.front().a", result_type="int", result_value="3")
         self.expect_expr("a[1].a", result_type="int", result_value="1")
--- vector-of-vectors/TestVectorOfVectorsFromStdModule.py	2025-01-17 20:03:54.000000 +0000
+++ vector-of-vectors/TestVectorOfVectorsFromStdModule.py	2025-01-17 20:16:33.931581 +0000
@@ -22,22 +22,24 @@
 
         self.runCmd("settings set target.import-std-module true")
 
         self.expect(
             "expr a",
-            patterns=["""\(std::vector<std::vector<int>(, std::allocator<std::vector<int> )* >\) \$0 = size=2 \{
+            patterns=[
+                """\(std::vector<std::vector<int>(, std::allocator<std::vector<int> )* >\) \$0 = size=2 \{
   \[0\] = size=3 \{
     \[0\] = 1
     \[1\] = 2
     \[2\] = 3
   \}
   \[1\] = size=3 \{
     \[0\] = 3
     \[1\] = 2
     \[2\] = 1
   \}
-\}"""],
+\}"""
+            ],
         )
         self.expect_expr("a.size()", result_type=size_type, result_value="2")
         front = self.expect_expr(
             "a.front().front()", result_type=value_type, result_value="1"
         )

``````````

</details>


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


More information about the lldb-commits mailing list