Skip to content

Commit e193ab9

Browse files
authoredOct 11, 2022
Use typing.List instead of list for typing annodations (#23129)
1 parent f8703c7 commit e193ab9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎scripts/build/build/target.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
from collections.abc import Iterable
4747
from dataclasses import dataclass
48-
from typing import Any, Dict, Optional
48+
from typing import Any, Dict, List, Optional
4949

5050

5151
@dataclass(init=False)
@@ -117,7 +117,7 @@ def _HasVariantPrefix(value: str, prefix: str):
117117
return value[len(prefix)+1:]
118118

119119

120-
def _StringIntoParts(full_input: str, remaining_input: str, fixed_targets: list[list[TargetPart]], modifiers: list[TargetPart]):
120+
def _StringIntoParts(full_input: str, remaining_input: str, fixed_targets: List[List[TargetPart]], modifiers: List[TargetPart]):
121121
"""Given an input string, process through all the input rules and return
122122
the underlying list of target parts for the input.
123123
@@ -191,13 +191,13 @@ def __init__(self, name, builder_class, **kwargs):
191191
# - esp32-devkitc-light is OK
192192
# - esp32-light is NOT ok
193193
# - esp32-m5stack is NOT ok
194-
self.fixed_targets: list[list[TargetPart]] = []
194+
self.fixed_targets: List[List[TargetPart]] = []
195195

196196
# a list of all available modifiers for this build target
197197
# Modifiers can be combined in any way
198-
self.modifiers: list[TargetPart] = []
198+
self.modifiers: List[TargetPart] = []
199199

200-
def AppendFixedTargets(self, parts: list[TargetPart]):
200+
def AppendFixedTargets(self, parts: List[TargetPart]):
201201
"""Append a list of potential targets/variants.
202202
203203
Example:

0 commit comments

Comments
 (0)
Please sign in to comment.