[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)

via lldb-commits lldb-commits at lists.llvm.org
Mon May 27 04:28:10 PDT 2024


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 80b78f5fb30c43cd88f0d096081bc7f1509b0110...aca5ab852854a46ba5443864c555d5479956d05d lldb/test/API/functionalities/completion/TestCompletion.py
``````````

</details>

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

``````````diff
--- TestCompletion.py	2024-05-27 11:22:26.000000 +0000
+++ TestCompletion.py	2024-05-27 11:27:41.326501 +0000
@@ -914,18 +914,18 @@
         self.registerSharedLibrariesWithTarget(target, ["shared"])
 
         basenames = []
         paths = []
         for m in target.modules:
-          basenames.append(m.file.basename)
-          paths.append(m.file.fullpath)
+            basenames.append(m.file.basename)
+            paths.append(m.file.fullpath)
 
         # To see all the diffs
         self.maxDiff = None
 
         # An empty string completes to everything
-        self.completions_match("target symbols add -s ", basenames+paths)
+        self.completions_match("target symbols add -s ", basenames + paths)
 
         # Base name completion
         self.completions_match("target symbols add -s a.", ["a.out"])
 
         # Full path completion
@@ -937,7 +937,7 @@
         self.completions_match("target symbols add -s '" + prefix_sep, paths)
 
         # The completed path should match the spelling of the input, so if the
         # input contains a double separator, so should the completions.
         prefix_sep_sep = prefix_sep + os.path.sep
-        paths_sep = [ prefix_sep_sep +p[len(prefix_sep):] for p in paths]
+        paths_sep = [prefix_sep_sep + p[len(prefix_sep) :] for p in paths]
         self.completions_match("target symbols add -s '" + prefix_sep_sep, paths_sep)

``````````

</details>


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


More information about the lldb-commits mailing list