Skip to content

Commit df65093

Browse files
committed
scripts: west_commands: zspdx: cmakecache: Fix linter issue
Fix redundant open mode. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 265cfb4 commit df65093

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

.ruff-excludes.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,9 +1232,6 @@
12321232
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
12331233
"UP032", # https://docs.astral.sh/ruff/rules/f-string
12341234
]
1235-
"./scripts/west_commands/zspdx/cmakecache.py" = [
1236-
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
1237-
]
12381235
"./scripts/west_commands/zspdx/cmakefileapi.py" = [
12391236
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
12401237
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports

scripts/west_commands/zspdx/cmakecache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def parseCMakeCacheFile(filePath):
1111
log.dbg(f"parsing CMake cache file at {filePath}")
1212
kv = {}
1313
try:
14-
with open(filePath, "r") as f:
14+
with open(filePath) as f:
1515
# should be a short file, so we'll use readlines
1616
lines = f.readlines()
1717

0 commit comments

Comments
 (0)