collections.namedtuple to typing.NameTuple and flake8 fixes

This commit is contained in:
Yannick Jadoul
2020-05-06 23:55:54 +02:00
parent c128018590
commit 40967a6572
5 changed files with 12 additions and 26 deletions
+2 -6
View File
@@ -5,13 +5,9 @@ import subprocess
import sys
import textwrap
import uuid
from collections import namedtuple
from typing import Callable, Dict, List, Optional
from typing import Callable, List, NamedTuple
from .environment import (
ParsedEnvironment,
)
from .util import (
BuildOptions,
get_build_verbosity_extra_flags,
@@ -47,7 +43,7 @@ def matches_platform(identifier):
return False
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'identifier', 'path'])
PythonConfiguration = NamedTuple('PythonConfiguration', [('version', str), ('identifier', str), ('path', str)])
def get_python_configurations(build_selector: Callable[[str], bool]) -> List[PythonConfiguration]: