From 5321c14628638b928ad83c953656e726c8c9db40 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Sat, 24 May 2025 13:20:49 +0200 Subject: [PATCH] scripts: west_commands: debug: Fix linter issues Fix issues reported by ruff. Signed-off-by: Pieter De Gendt --- .ruff-excludes.toml | 4 ---- scripts/west_commands/debug.py | 11 +++++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.ruff-excludes.toml b/.ruff-excludes.toml index a98e678eb25..ecd14da9b60 100644 --- a/.ruff-excludes.toml +++ b/.ruff-excludes.toml @@ -1078,10 +1078,6 @@ "UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation-union "UP035", # https://docs.astral.sh/ruff/rules/deprecated-import ] -"./scripts/west_commands/debug.py" = [ - "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports - "UP008", # https://docs.astral.sh/ruff/rules/super-call-with-parameters -] "./scripts/west_commands/fetchers/__init__.py" = [ "UP032", # https://docs.astral.sh/ruff/rules/f-string ] diff --git a/scripts/west_commands/debug.py b/scripts/west_commands/debug.py index e3bf9b40275..1000e88bd84 100644 --- a/scripts/west_commands/debug.py +++ b/scripts/west_commands/debug.py @@ -8,15 +8,14 @@ from textwrap import dedent -from west.commands import WestCommand - from run_common import add_parser_common, do_run_common +from west.commands import WestCommand class Debug(WestCommand): def __init__(self): - super(Debug, self).__init__( + super().__init__( 'debug', # Keep this in sync with the string in west-commands.yml. 'flash and interactively debug a Zephyr application', @@ -37,7 +36,7 @@ class Debug(WestCommand): class DebugServer(WestCommand): def __init__(self): - super(DebugServer, self).__init__( + super().__init__( 'debugserver', # Keep this in sync with the string in west-commands.yml. 'connect to board and launch a debug server', @@ -61,7 +60,7 @@ class DebugServer(WestCommand): class Attach(WestCommand): def __init__(self): - super(Attach, self).__init__( + super().__init__( 'attach', # Keep this in sync with the string in west-commands.yml. 'interactively debug a board', @@ -79,7 +78,7 @@ class Attach(WestCommand): class Rtt(WestCommand): def __init__(self): - super(Rtt, self).__init__( + super().__init__( 'rtt', # Keep this in sync with the string in west-commands.yml. 'open an rtt shell',