Skip to content

Commit 3a8106b

Browse files
pdgendtkartben
authored andcommitted
scripts: logging: dictionary: utils: Fix redundant open flags
Fix issue reported by ruff. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 5759f55 commit 3a8106b

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
@@ -568,9 +568,6 @@
568568
"UP036", # https://docs.astral.sh/ruff/rules/outdated-version-block
569569
"UP038", # https://docs.astral.sh/ruff/rules/non-pep604-isinstance
570570
]
571-
"./scripts/logging/dictionary/dictionary_parser/utils.py" = [
572-
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
573-
]
574571
"./scripts/logging/dictionary/log_parser.py" = [
575572
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
576573
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes

scripts/logging/dictionary/dictionary_parser/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def convert_hex_file_to_bin(hexfile):
1515
"""This converts a file in hexadecimal to binary"""
1616
bin_data = b''
1717

18-
with open(hexfile, "r", encoding="iso-8859-1") as hfile:
18+
with open(hexfile, encoding="iso-8859-1") as hfile:
1919
for line in hfile.readlines():
2020
hex_str = line.strip()
2121

0 commit comments

Comments
 (0)