scripts: logging: dictionary: utils: Fix redundant open flags
Fix issue reported by ruff. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
5759f5584e
commit
3a8106b598
2 changed files with 1 additions and 4 deletions
|
@ -568,9 +568,6 @@
|
||||||
"UP036", # https://docs.astral.sh/ruff/rules/outdated-version-block
|
"UP036", # https://docs.astral.sh/ruff/rules/outdated-version-block
|
||||||
"UP038", # https://docs.astral.sh/ruff/rules/non-pep604-isinstance
|
"UP038", # https://docs.astral.sh/ruff/rules/non-pep604-isinstance
|
||||||
]
|
]
|
||||||
"./scripts/logging/dictionary/dictionary_parser/utils.py" = [
|
|
||||||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
|
||||||
]
|
|
||||||
"./scripts/logging/dictionary/log_parser.py" = [
|
"./scripts/logging/dictionary/log_parser.py" = [
|
||||||
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
|
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
|
||||||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
||||||
|
|
|
@ -15,7 +15,7 @@ def convert_hex_file_to_bin(hexfile):
|
||||||
"""This converts a file in hexadecimal to binary"""
|
"""This converts a file in hexadecimal to binary"""
|
||||||
bin_data = b''
|
bin_data = b''
|
||||||
|
|
||||||
with open(hexfile, "r", encoding="iso-8859-1") as hfile:
|
with open(hexfile, encoding="iso-8859-1") as hfile:
|
||||||
for line in hfile.readlines():
|
for line in hfile.readlines():
|
||||||
hex_str = line.strip()
|
hex_str = line.strip()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue