Skip to content

Commit 0a0e691

Browse files
pdgendtkartben
authored andcommitted
scripts: west_commands: zspdx: cmakecache: Fix linter issue
Fix redundant open mode. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 10e5753 commit 0a0e691

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
@@ -1190,9 +1190,6 @@
11901190
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
11911191
"UP032", # https://docs.astral.sh/ruff/rules/f-string
11921192
]
1193-
"./scripts/west_commands/zspdx/cmakecache.py" = [
1194-
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
1195-
]
11961193
"./scripts/west_commands/zspdx/cmakefileapi.py" = [
11971194
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
11981195
"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)