Skip to content

Commit 45627d1

Browse files
authored
Update incorrect or incomplete constants in distutils (#12536)
1 parent b3c077f commit 45627d1

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

stdlib/distutils/command/install.pyi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
import sys
12
from collections.abc import Callable
2-
from typing import Any, ClassVar
3+
from typing import Any, ClassVar, Final
34

45
from ..cmd import Command
56

67
HAS_USER_SITE: bool
78
SCHEME_KEYS: tuple[str, ...]
8-
INSTALL_SCHEMES: dict[str, dict[Any, Any]]
9+
INSTALL_SCHEMES: Final[dict[str, dict[str, str]]]
10+
11+
if sys.version_info < (3, 10):
12+
WINDOWS_SCHEME: Final[dict[str, str]]
913

1014
class install(Command):
1115
description: str

stdlib/distutils/debug.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
DEBUG: bool | None
1+
from typing import Final
2+
3+
DEBUG: Final[str | None]

stubs/setuptools/setuptools/_distutils/sysconfig.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from typing import Literal, overload
1+
from typing import Final, Literal, overload
22
from typing_extensions import deprecated
33

44
from setuptools._distutils.ccompiler import CCompiler
55

6-
PREFIX: str
7-
EXEC_PREFIX: str
6+
PREFIX: Final[str]
7+
EXEC_PREFIX: Final[str]
88

99
@overload
1010
@deprecated("SO is deprecated, use EXT_SUFFIX. Support will be removed when this module is synchronized with stdlib Python 3.11")

0 commit comments

Comments
 (0)