style: edtlib: Remove unnecessary quotes
Remove unnecessary quotes from deferred type annotations to fix the Ruff UP037 warning. Signed-off-by: James Roy <rruuaanng@outlook.com>
This commit is contained in:
parent
c69fe0ef55
commit
1425de54e7
@ -441,7 +441,6 @@
|
||||
"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
|
||||
"UP037", # https://docs.astral.sh/ruff/rules/quoted-annotation
|
||||
]
|
||||
"./scripts/dts/python-devicetree/src/devicetree/edtlib.py" = [
|
||||
"B904", # https://docs.astral.sh/ruff/rules/raise-without-from-inside-except
|
||||
@ -453,7 +452,6 @@
|
||||
"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
|
||||
"UP037", # https://docs.astral.sh/ruff/rules/quoted-annotation
|
||||
]
|
||||
"./scripts/dts/python-devicetree/src/devicetree/grutils.py" = [
|
||||
"E501", # https://docs.astral.sh/ruff/rules/line-too-long
|
||||
|
||||
@ -221,7 +221,7 @@ class Binding:
|
||||
if not isinstance(raw["child-binding"], dict):
|
||||
_err(f"malformed 'child-binding:' in {self.path}, "
|
||||
"expected a binding (dictionary with keys/values)")
|
||||
self.child_binding: Optional['Binding'] = Binding(
|
||||
self.child_binding: Optional[Binding] = Binding(
|
||||
path, fname2path,
|
||||
raw=raw["child-binding"],
|
||||
require_compatible=False,
|
||||
@ -233,7 +233,7 @@ class Binding:
|
||||
self._check(require_compatible, require_description)
|
||||
|
||||
# Initialize look up tables.
|
||||
self.prop2specs: dict[str, 'PropertySpec'] = {}
|
||||
self.prop2specs: dict[str, PropertySpec] = {}
|
||||
for prop_name in self.raw.get("properties", {}).keys():
|
||||
self.prop2specs[prop_name] = PropertySpec(prop_name, self)
|
||||
self.specifier2cells: dict[str, list[str]] = {}
|
||||
@ -1034,7 +1034,7 @@ class Node:
|
||||
self._binding: Optional[Binding] = None
|
||||
|
||||
# Public, some of which are initialized properly later:
|
||||
self.edt: 'EDT' = edt
|
||||
self.edt: EDT = edt
|
||||
self.dep_ordinal: int = -1
|
||||
self.compats: list[str] = compats
|
||||
self.ranges: list[Range] = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user