scripts: west_commands: zspdx: getincludes: Fix linter issues
Fix issues reported by ruff. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
3ccda0e4fe
commit
8360238ae5
2 changed files with 2 additions and 7 deletions
|
@ -1190,11 +1190,6 @@
|
|||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
||||
"UP032", # https://docs.astral.sh/ruff/rules/f-string
|
||||
]
|
||||
"./scripts/west_commands/zspdx/getincludes.py" = [
|
||||
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
||||
"UP021", # https://docs.astral.sh/ruff/rules/replace-universal-newlines
|
||||
"UP022", # https://docs.astral.sh/ruff/rules/replace-stdout-stderr
|
||||
]
|
||||
"./scripts/west_commands/zspdx/sbom.py" = [
|
||||
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
|
||||
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from subprocess import run, PIPE
|
||||
from subprocess import run
|
||||
|
||||
from west import log
|
||||
|
||||
|
@ -30,7 +30,7 @@ def getCIncludes(compilerPath, srcFile, tcg):
|
|||
# prepare command invocation
|
||||
cmd = [compilerPath, "-E", "-H"] + fragments + includes + defines + [srcFile]
|
||||
|
||||
cp = run(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
||||
cp = run(cmd, capture_output=True, text=True)
|
||||
if cp.returncode != 0:
|
||||
log.dbg(f" - calling {compilerPath} failed with error code {cp.returncode}")
|
||||
return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue