[Lldb-commits] [lldb] [LLDB] added getName method in SBModule (PR #150331)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 4 12:55:02 PDT 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 HEAD~1...HEAD lldb/test/API/python_api/sbmodule/TestSBModule.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- TestSBModule.py 2025-08-04 19:52:13.000000 +0000
+++ TestSBModule.py 2025-08-04 19:54:34.055452 +0000
@@ -29,17 +29,22 @@
for i in range(target.GetNumModules()):
module = target.GetModuleAtIndex(i)
file_spec = module.GetFileSpec()
name = module.GetName()
if file_spec.IsValid() and file_spec.exists:
-#If file is valid and file exist, expect GetName() to be None
- self.assertIsNone(name, f"Expected None for module with valid file {file_spec.GetFilename()}, got {name!r}")
+ # If file is valid and file exist, expect GetName() to be None
+ self.assertIsNone(
+ name,
+ f"Expected None for module with valid file {file_spec.GetFilename()}, got {name!r}",
+ )
else:
-#If no valid file, expect GetName() to be a non - empty string
+ # If no valid file, expect GetName() to be a non - empty string
self.assertIsInstance(name, str)
- self.assertTrue(name, "Expected a non-empty name for module without a valid file")
-
+ self.assertTrue(
+ name, "Expected a non-empty name for module without a valid file"
+ )
+
@skipUnlessDarwin
@skipIfRemote
def test_module_is_file_backed(self):
"""Test the SBModule::IsFileBacked() method"""
self.build()
``````````
</details>
https://github.com/llvm/llvm-project/pull/150331
More information about the lldb-commits
mailing list