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/packages/Python/lldbsuite/test/decorators.py
lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.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
--- packages/Python/lldbsuite/test/lldbplatformutil.py 2025-12-18
11:30:59.000000 +0000
+++ packages/Python/lldbsuite/test/lldbplatformutil.py 2025-12-18
11:34:09.221651 +0000
@@ -301,20 +301,21 @@
return "unknown"
def getWindowsVersion():
"""Returns a string that represents the Windows version.
-
+
The string is a concatenation of the following, eparated by a dot:
- The major version number.
- The build number.
-
+
Example:
- Windows 11 version 24H2 -> "10.26100"
- Windows 10 version 1809 -> "10.17763"
"""
import sys
+
if sys.platform != "win32":
return "unknown"
windows_version = sys.getwindowsversion()
return f"{windows_version.major}.{windows_version.build}"
--- test/API/tools/lldb-dap/launch/TestDAP_launch.py 2025-12-18
11:30:59.000000 +0000
+++ test/API/tools/lldb-dap/launch/TestDAP_launch.py 2025-12-18
11:34:09.442187 +0000
@@ -14,11 +14,11 @@
# Despite the test program printing correctly. See
# https://github.com/llvm/llvm-project/issues/137599.
class TestDAP_launch(lldbdap_testcase.DAPTestCaseBase):
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
def test_default(self):
"""
Tests the default launch of a simple program. No arguments,
environment, or anything else is specified.
"""
@@ -74,11 +74,11 @@
self.assertRegex(
response["body"]["error"]["format"],
r"unexpected value, expected 'internalConsole\',
'integratedTerminal\' or 'externalTerminal\' at arguments.console",
)
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
def test_termination(self):
"""
Tests the correct termination of lldb-dap upon a 'disconnect'
request.
"""
@@ -208,11 +208,11 @@
# Now get the STDOUT and verify our program argument is correct
output = self.get_stdout()
self.assertEqual(output, "", "expect no program output")
@skipIfLinux # shell argument expansion doesn't seem to work on Linux
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
@expectedFailureAll(oslist=["freebsd", "netbsd"],
bugnumber="llvm.org/pr48349")
def test_shellExpandArguments_enabled(self):
"""
Tests the default launch of a simple program with shell expansion
enabled.
@@ -231,11 +231,11 @@
if line.startswith("arg[1] ="):
self.assertIn(
quote_path, line, 'verify "%s" expanded to "%s"' % (glob,
program)
)
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
def test_shellExpandArguments_disabled(self):
"""
Tests the default launch of a simple program with shell expansion
disabled.
"""
@@ -253,11 +253,11 @@
if line.startswith("arg[1] ="):
self.assertIn(
quote_path, line, 'verify "%s" stayed to "%s"' % (glob,
glob)
)
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
def test_args(self):
"""
Tests launch of a simple program with arguments
"""
program = self.getBuildArtifact("a.out")
@@ -278,11 +278,11 @@
quoted_arg,
lines[i],
'arg[%i] "%s" not in "%s"' % (i + 1, quoted_arg, lines[i]),
)
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
def test_environment_with_object(self):
"""
Tests launch of a simple program with environment variables
"""
program = self.getBuildArtifact("a.out")
@@ -555,11 +555,11 @@
# "terminateCommands"
self.dap_server.request_disconnect(terminateDebuggee=True)
output = self.collect_console(pattern=terminateCommands[0])
self.verify_commands("terminateCommands", output, terminateCommands)
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
def test_version(self):
"""
Tests that "initialize" response contains the "version" string the same
as the one returned by "version" command.
"""
@@ -638,11 +638,11 @@
self.assertIn(
program, lines[0], "make sure program path is in first
argument"
)
@skipIfAsan
- @skipIfWindows(windows_version=['>', '10.17763'])
+ @skipIfWindows(windows_version=[">", "10.17763"])
@skipIf(oslist=["linux"], archs=no_match(["x86_64"]))
@skipIfBuildType(["debug"])
def test_stdio_redirection_and_console(self):
"""
Test stdio redirection and console.
``````````
</details>
https://github.com/llvm/llvm-project/pull/172838
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits