Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use typing.List instead of list for typing annodations #23129

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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