scripts: west_commands: blobs: Fix linter issues
Fix issues reported by ruff. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
0c18197325
commit
eba120384a
2 changed files with 3 additions and 7 deletions
|
@ -1073,10 +1073,6 @@
|
||||||
"UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation
|
"UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation
|
||||||
"UP035", # https://docs.astral.sh/ruff/rules/deprecated-import
|
"UP035", # https://docs.astral.sh/ruff/rules/deprecated-import
|
||||||
]
|
]
|
||||||
"./scripts/west_commands/blobs.py" = [
|
|
||||||
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
|
|
||||||
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
|
||||||
]
|
|
||||||
"./scripts/west_commands/build.py" = [
|
"./scripts/west_commands/build.py" = [
|
||||||
"E501", # https://docs.astral.sh/ruff/rules/line-too-long
|
"E501", # https://docs.astral.sh/ruff/rules/line-too-long
|
||||||
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
||||||
|
|
|
@ -4,18 +4,18 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
from pathlib import Path
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from west.commands import WestCommand
|
from west.commands import WestCommand
|
||||||
|
|
||||||
from zephyr_ext_common import ZEPHYR_BASE
|
from zephyr_ext_common import ZEPHYR_BASE
|
||||||
|
|
||||||
sys.path.append(os.fspath(Path(__file__).parent.parent))
|
sys.path.append(os.fspath(Path(__file__).parent.parent))
|
||||||
import zephyr_module
|
import zephyr_module
|
||||||
|
|
||||||
|
|
||||||
class Blobs(WestCommand):
|
class Blobs(WestCommand):
|
||||||
|
|
||||||
DEFAULT_LIST_FMT = '{module} {status} {path} {type} {abspath}'
|
DEFAULT_LIST_FMT = '{module} {status} {path} {type} {abspath}'
|
||||||
|
@ -203,6 +203,6 @@ class Blobs(WestCommand):
|
||||||
subcmd = getattr(self, args.subcmd[0])
|
subcmd = getattr(self, args.subcmd[0])
|
||||||
|
|
||||||
if args.subcmd[0] != 'list' and args.format is not None:
|
if args.subcmd[0] != 'list' and args.format is not None:
|
||||||
self.die(f'unexpected --format argument; this is a "west blobs list" option')
|
self.die('unexpected --format argument; this is a "west blobs list" option')
|
||||||
|
|
||||||
subcmd(args)
|
subcmd(args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue