Skip to content

Commit 4b88d36

Browse files
authored
Merge pull request #1494 from pypa/fixpyright
Fix a few types to keep pyright happy
2 parents 58c647a + d7759bf commit 4b88d36

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

cibuildwheel/architecture.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
from ._compat.typing import Final, Literal, assert_never
1111
from .typing import PlatformName
1212

13-
PRETTY_NAMES: Final = {"linux": "Linux", "macos": "macOS", "windows": "Windows"}
13+
PRETTY_NAMES: Final[dict[PlatformName, str]] = {
14+
"linux": "Linux",
15+
"macos": "macOS",
16+
"windows": "Windows",
17+
}
1418

1519
ARCH_SYNONYMS: Final[list[dict[PlatformName, str | None]]] = [
1620
{"linux": "x86_64", "macos": "x86_64", "windows": "AMD64"},

cibuildwheel/logger.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
import re
66
import sys
77
import time
8-
from typing import IO, AnyStr
8+
from typing import IO, AnyStr, Tuple
99

1010
from ._compat.typing import Final
1111
from .util import CIProvider, detect_ci_provider
1212

13-
DEFAULT_FOLD_PATTERN: Final = ("{name}", "")
14-
FOLD_PATTERNS: Final = {
13+
FoldPattern = Tuple[str, str]
14+
DEFAULT_FOLD_PATTERN: Final[FoldPattern] = ("{name}", "")
15+
FOLD_PATTERNS: Final[dict[str, FoldPattern]] = {
1516
"azure": ("##[group]{name}", "##[endgroup]"),
1617
"travis": ("travis_fold:start:{identifier}\n{name}", "travis_fold:end:{identifier}"),
1718
"github": ("::group::{name}", "::endgroup::{name}"),
1819
}
1920

20-
PLATFORM_IDENTIFIER_DESCRIPTIONS: Final = {
21+
PLATFORM_IDENTIFIER_DESCRIPTIONS: Final[dict[str, str]] = {
2122
"manylinux_x86_64": "manylinux x86_64",
2223
"manylinux_i686": "manylinux i686",
2324
"manylinux_aarch64": "manylinux aarch64",

0 commit comments

Comments
 (0)