diff --git a/.ruff-excludes.toml b/.ruff-excludes.toml index e8874bc3488..c4fa7262fce 100644 --- a/.ruff-excludes.toml +++ b/.ruff-excludes.toml @@ -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 diff --git a/scripts/dts/python-devicetree/src/devicetree/edtlib.py b/scripts/dts/python-devicetree/src/devicetree/edtlib.py index 06535d79ac0..90f98f87236 100644 --- a/scripts/dts/python-devicetree/src/devicetree/edtlib.py +++ b/scripts/dts/python-devicetree/src/devicetree/edtlib.py @@ -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] = []