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
lldb/test/API/functionalities/scripted_symbol_locator/TestScriptedSymbolLocator.py
lldb/test/API/functionalities/scripted_symbol_locator/source_locator.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
--- TestScriptedSymbolLocator.py 2026-02-13 08:27:57.000000 +0000
+++ TestScriptedSymbolLocator.py 2026-02-13 08:50:44.467235 +0000
@@ -35,13 +35,11 @@
def script(self, expr):
"""Execute a Python expression in LLDB's script interpreter and return
the result as a string."""
ret = lldb.SBCommandReturnObject()
- self.dbg.GetCommandInterpreter().HandleCommand(
- "script " + expr, ret
- )
+ self.dbg.GetCommandInterpreter().HandleCommand("script " + expr, ret)
return ret.GetOutput().strip() if ret.Succeeded() else ""
@skipUnlessPlatform(["linux", "freebsd"])
def test_locate_source_file(self):
"""Test that the scripted locator resolves source files and receives
@@ -59,13 +57,11 @@
self.assertTrue(target and target.IsValid(), VALID_TARGET)
# Now set up the scripted locator. LocateSourceFile will only be called
# from the main thread when we access a frame's line entry.
self.import_locator()
- self.script(
- "source_locator.SourceLocator.resolved_dir = '%s'" % tmp_dir
- )
+ self.script("source_locator.SourceLocator.resolved_dir = '%s'" %
tmp_dir)
self.set_locator_class("source_locator.SourceLocator")
self.addTearDownHook(lambda: self.clear_locator_class())
bp = target.BreakpointCreateByName("func")
self.assertTrue(bp and bp.IsValid(), "Breakpoint is valid")
--- source_locator.py 2026-02-13 08:27:57.000000 +0000
+++ source_locator.py 2026-02-13 08:50:44.486416 +0000
@@ -24,12 +24,13 @@
return None
def locate_executable_symbol_file(self, module_spec, default_search_paths):
return None
- def download_object_and_symbol_file(self, module_spec, force_lookup,
- copy_executable):
+ def download_object_and_symbol_file(
+ self, module_spec, force_lookup, copy_executable
+ ):
return False
class NoneLocator:
"""Locator that always returns None."""
@@ -44,8 +45,9 @@
return None
def locate_executable_symbol_file(self, module_spec, default_search_paths):
return None
- def download_object_and_symbol_file(self, module_spec, force_lookup,
- copy_executable):
+ def download_object_and_symbol_file(
+ self, module_spec, force_lookup, copy_executable
+ ):
return False
``````````
</details>
https://github.com/llvm/llvm-project/pull/181334
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits