File tree Expand file tree Collapse file tree 2 files changed +15
-26
lines changed
Expand file tree Collapse file tree 2 files changed +15
-26
lines changed Original file line number Diff line number Diff line change 2525 hooks :
2626 - id : mypy
2727 name : mypy 3.11 on cibuildwheel/
28- exclude : ^cibuildwheel/resources/.*py|bin/generate_schema.py $
28+ exclude : ^cibuildwheel/resources/.*py$
2929 args : ["--python-version=3.11"]
3030 additional_dependencies : &mypy-dependencies
3131 - bracex
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- import functools
43import platform as platform_module
54import re
65import shutil
76import subprocess
87import sys
98from collections .abc import Set
10- from enum import Enum
9+ from enum import StrEnum , auto
1110from typing import Final , Literal , assert_never
1211
1312from .typing import PlatformName
@@ -39,38 +38,28 @@ def _check_aarch32_el0() -> bool:
3938 return check .returncode == 0 and check .stdout .startswith ("armv" )
4039
4140
42- @functools .total_ordering
43- class Architecture (Enum ):
44- value : str
45-
41+ class Architecture (StrEnum ):
4642 # mac/linux archs
47- x86_64 = "x86_64"
43+ x86_64 = auto ()
4844
4945 # linux archs
50- i686 = "i686"
51- aarch64 = "aarch64"
52- ppc64le = "ppc64le"
53- s390x = "s390x"
54- armv7l = "armv7l"
46+ i686 = auto ()
47+ aarch64 = auto ()
48+ ppc64le = auto ()
49+ s390x = auto ()
50+ armv7l = auto ()
5551
5652 # mac archs
57- universal2 = "universal2"
58- arm64 = "arm64"
53+ universal2 = auto ()
54+ arm64 = auto ()
5955
6056 # windows archs
61- x86 = "x86"
62- AMD64 = "AMD64"
63- ARM64 = "ARM64"
57+ x86 = auto ()
58+ AMD64 = auto ()
59+ ARM64 = auto ()
6460
6561 # WebAssembly
66- wasm32 = "wasm32"
67-
68- # Allow this to be sorted
69- def __lt__ (self , other : Architecture ) -> bool :
70- return self .value < other .value
71-
72- def __str__ (self ) -> str :
73- return self .name
62+ wasm32 = auto ()
7463
7564 @staticmethod
7665 def parse_config (config : str , platform : PlatformName ) -> set [Architecture ]:
You can’t perform that action at this time.
0 commit comments