diff --git a/.ruff-excludes.toml b/.ruff-excludes.toml index 04a6cad7681..db1f56fba0b 100644 --- a/.ruff-excludes.toml +++ b/.ruff-excludes.toml @@ -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 diff --git a/scripts/west_commands/zspdx/cmakecache.py b/scripts/west_commands/zspdx/cmakecache.py index 612cee0170f..323db9812d7 100644 --- a/scripts/west_commands/zspdx/cmakecache.py +++ b/scripts/west_commands/zspdx/cmakecache.py @@ -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()