From f7b74b4dbb755a06105a0e4aeed3aa4b561e57a3 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 11 Oct 2022 16:50:47 -0400 Subject: [PATCH] Use `typing.List` instead of `list` for typing annodations --- scripts/build/build/target.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/build/build/target.py b/scripts/build/build/target.py index 1b7ca1626b66c6..c90a603cddeb9e 100644 --- a/scripts/build/build/target.py +++ b/scripts/build/build/target.py @@ -45,7 +45,7 @@ from collections.abc import Iterable from dataclasses import dataclass -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional @dataclass(init=False) @@ -117,7 +117,7 @@ def _HasVariantPrefix(value: str, prefix: str): return value[len(prefix)+1:] -def _StringIntoParts(full_input: str, remaining_input: str, fixed_targets: list[list[TargetPart]], modifiers: list[TargetPart]): +def _StringIntoParts(full_input: str, remaining_input: str, fixed_targets: List[List[TargetPart]], modifiers: List[TargetPart]): """Given an input string, process through all the input rules and return the underlying list of target parts for the input. @@ -191,13 +191,13 @@ def __init__(self, name, builder_class, **kwargs): # - esp32-devkitc-light is OK # - esp32-light is NOT ok # - esp32-m5stack is NOT ok - self.fixed_targets: list[list[TargetPart]] = [] + self.fixed_targets: List[List[TargetPart]] = [] # a list of all available modifiers for this build target # Modifiers can be combined in any way - self.modifiers: list[TargetPart] = [] + self.modifiers: List[TargetPart] = [] - def AppendFixedTargets(self, parts: list[TargetPart]): + def AppendFixedTargets(self, parts: List[TargetPart]): """Append a list of potential targets/variants. Example: