Browse Source

scripts: west_commands: flash: Fix linter issues

Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
pull/88314/merge
Pieter De Gendt 2 months ago committed by Anas Nashif
parent
commit
359a0c2809
  1. 4
      .ruff-excludes.toml
  2. 7
      scripts/west_commands/flash.py

4
.ruff-excludes.toml

@ -1090,10 +1090,6 @@
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler "SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
] ]
"./scripts/west_commands/flash.py" = [
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
"UP008", # https://docs.astral.sh/ruff/rules/super-call-with-parameters
]
"./scripts/west_commands/robot.py" = [ "./scripts/west_commands/robot.py" = [
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
"UP008", # https://docs.astral.sh/ruff/rules/super-call-with-parameters "UP008", # https://docs.astral.sh/ruff/rules/super-call-with-parameters

7
scripts/west_commands/flash.py

@ -6,17 +6,16 @@
'''west "flash" command''' '''west "flash" command'''
from west.commands import WestCommand from pathlib import Path
from run_common import add_parser_common, do_run_common, get_build_dir from run_common import add_parser_common, do_run_common, get_build_dir
from west.commands import WestCommand
from pathlib import Path
class Flash(WestCommand): class Flash(WestCommand):
def __init__(self): def __init__(self):
super(Flash, self).__init__( super().__init__(
'flash', 'flash',
# Keep this in sync with the string in west-commands.yml. # Keep this in sync with the string in west-commands.yml.
'flash and run a binary on a board', 'flash and run a binary on a board',

Loading…
Cancel
Save