Skip to content

Commit

Permalink
Use typing.List instead of list for typing annodations (project-c…
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored and selissia committed Oct 12, 2022
1 parent d584115 commit d76d473
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/build/build/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d76d473

Please sign in to comment.