Merge remote-tracking branch 'upstream/main' into arm64
This commit is contained in:
@@ -47,7 +47,7 @@ repos:
|
||||
args: [--include-version-classifiers, --max-py-version=3.10]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v0.971
|
||||
rev: v0.981
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy 3.7 on cibuildwheel/
|
||||
|
||||
@@ -114,6 +114,7 @@ class Architecture(Enum):
|
||||
return all_archs_map[platform]
|
||||
|
||||
@staticmethod
|
||||
# pylint: disable-next=inconsistent-return-statements
|
||||
def bitness_archs(platform: PlatformName, bitness: Literal["64", "32"]) -> set[Architecture]:
|
||||
archs_32 = {Architecture.i686, Architecture.x86}
|
||||
auto_archs = Architecture.auto_archs(platform)
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import TYPE_CHECKING, NoReturn, Set, Union
|
||||
from typing import TYPE_CHECKING, Union
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import Final, Literal, OrderedDict, Protocol, TypedDict
|
||||
@@ -11,9 +11,9 @@ else:
|
||||
from typing import Final, Literal, OrderedDict, Protocol, TypedDict
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from typing_extensions import NotRequired
|
||||
from typing_extensions import NotRequired, assert_never
|
||||
else:
|
||||
from typing import NotRequired
|
||||
from typing import NotRequired, assert_never
|
||||
|
||||
__all__ = (
|
||||
"Final",
|
||||
@@ -25,10 +25,8 @@ __all__ = (
|
||||
"PLATFORMS",
|
||||
"PopenBytes",
|
||||
"Protocol",
|
||||
"Set",
|
||||
"TypedDict",
|
||||
"OrderedDict",
|
||||
"Union",
|
||||
"assert_never",
|
||||
"NotRequired",
|
||||
)
|
||||
@@ -44,7 +42,3 @@ else:
|
||||
|
||||
PlatformName = Literal["linux", "macos", "windows"]
|
||||
PLATFORMS: Final[set[PlatformName]] = {"linux", "macos", "windows"}
|
||||
|
||||
|
||||
def assert_never(value: NoReturn) -> NoReturn:
|
||||
assert False, f"Unhandled value: {value} ({type(value).__name__})" # noqa: B011
|
||||
|
||||
Reference in New Issue
Block a user