Browse Source

scripts: west_commands: zspdx: cmakecache: Fix linter issue

Fix redundant open mode.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
pull/90971/head
Pieter De Gendt 2 months ago committed by Benjamin Cabé
parent
commit
0a0e691750
  1. 3
      .ruff-excludes.toml
  2. 2
      scripts/west_commands/zspdx/cmakecache.py

3
.ruff-excludes.toml

@ -1190,9 +1190,6 @@ @@ -1190,9 +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/cmakecache.py" = [
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
]
"./scripts/west_commands/zspdx/cmakefileapi.py" = [
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports

2
scripts/west_commands/zspdx/cmakecache.py

@ -11,7 +11,7 @@ def parseCMakeCacheFile(filePath): @@ -11,7 +11,7 @@ def parseCMakeCacheFile(filePath):
log.dbg(f"parsing CMake cache file at {filePath}")
kv = {}
try:
with open(filePath, "r") as f:
with open(filePath) as f:
# should be a short file, so we'll use readlines
lines = f.readlines()

Loading…
Cancel
Save