Browse Source

style: edtlib: Remove the redundant call arguments

Remove the redundant positional argument in
open function to fix the Ruff UP015 warning.

Signed-off-by: James Roy <rruuaanng@outlook.com>
pull/87825/head
James Roy 5 months ago committed by Henrik Brix Andersen
parent
commit
8bf5fd9668
  1. 1
      .ruff-excludes.toml
  2. 2
      scripts/dts/python-devicetree/src/devicetree/edtlib.py

1
.ruff-excludes.toml

@ -444,7 +444,6 @@ @@ -444,7 +444,6 @@
"B904", # https://docs.astral.sh/ruff/rules/raise-without-from-inside-except
"SIM118", # https://docs.astral.sh/ruff/rules/in-dict-keys
"UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
]
"./scripts/dts/python-devicetree/src/devicetree/grutils.py" = [
"E501", # https://docs.astral.sh/ruff/rules/line-too-long

2
scripts/dts/python-devicetree/src/devicetree/edtlib.py

@ -2457,7 +2457,7 @@ def load_vendor_prefixes_txt(vendor_prefixes: str) -> dict[str, str]: @@ -2457,7 +2457,7 @@ def load_vendor_prefixes_txt(vendor_prefixes: str) -> dict[str, str]:
representation mapping a vendor prefix to the vendor name.
"""
vnd2vendor: dict[str, str] = {}
with open(vendor_prefixes, 'r', encoding='utf-8') as f:
with open(vendor_prefixes, encoding='utf-8') as f:
for line in f:
line = line.strip()

Loading…
Cancel
Save