Browse Source

style: edtlib: Remove deprecated packages

Remove imported deprecated packages and replace
with new packages to fix Ruff UP035 warning.

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

2
.ruff-excludes.toml

@ -440,7 +440,6 @@ @@ -440,7 +440,6 @@
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
"SIM201", # https://docs.astral.sh/ruff/rules/negate-equal-op
"UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation
"UP035", # https://docs.astral.sh/ruff/rules/deprecated-import
]
"./scripts/dts/python-devicetree/src/devicetree/edtlib.py" = [
"B904", # https://docs.astral.sh/ruff/rules/raise-without-from-inside-except
@ -451,7 +450,6 @@ @@ -451,7 +450,6 @@
"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
"UP035", # https://docs.astral.sh/ruff/rules/deprecated-import
]
"./scripts/dts/python-devicetree/src/devicetree/grutils.py" = [
"E501", # https://docs.astral.sh/ruff/rules/line-too-long

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

@ -74,6 +74,7 @@ from typing import (Any, Callable, Iterable, NoReturn, @@ -74,6 +74,7 @@ from typing import (Any, Callable, Iterable, NoReturn,
Optional, TYPE_CHECKING, Union)
import base64
import hashlib
from collections.abc import Callable, Iterable
import logging
import os
import re

Loading…
Cancel
Save