mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
distutils: improve boolean parameters with int defaults (#11928)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any
|
||||
from typing import Any, Literal
|
||||
|
||||
from ..cmd import Command
|
||||
|
||||
@@ -9,9 +9,9 @@ if sys.platform == "win32":
|
||||
class PyDialog(Dialog):
|
||||
def __init__(self, *args, **kw) -> None: ...
|
||||
def title(self, title) -> None: ...
|
||||
def back(self, title, next, name: str = "Back", active: int = 1): ...
|
||||
def cancel(self, title, next, name: str = "Cancel", active: int = 1): ...
|
||||
def next(self, title, next, name: str = "Next", active: int = 1): ...
|
||||
def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1): ...
|
||||
def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1): ...
|
||||
def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1): ...
|
||||
def xbutton(self, name, title, next, xpos): ...
|
||||
|
||||
class bdist_msi(Command):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, Literal
|
||||
|
||||
from ..cmd import Command
|
||||
from ..util import Mixin2to3 as Mixin2to3
|
||||
@@ -32,7 +32,7 @@ class build_py(Command):
|
||||
def find_all_modules(self): ...
|
||||
def get_source_files(self): ...
|
||||
def get_module_outfile(self, build_dir, package, module): ...
|
||||
def get_outputs(self, include_bytecode: int = 1): ...
|
||||
def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1): ...
|
||||
def build_module(self, module, module_file, package): ...
|
||||
def build_modules(self) -> None: ...
|
||||
def build_packages(self) -> None: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, Literal
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from ..cmd import Command
|
||||
@@ -16,7 +16,7 @@ class SilentReporter(_Reporter):
|
||||
report_level,
|
||||
halt_level,
|
||||
stream: Any | None = ...,
|
||||
debug: int = ...,
|
||||
debug: bool | Literal[0, 1] = 0,
|
||||
encoding: str = ...,
|
||||
error_handler: str = ...,
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from collections.abc import Sequence
|
||||
from re import Pattern
|
||||
from typing import Any
|
||||
from typing import Any, Literal
|
||||
|
||||
from ..ccompiler import CCompiler
|
||||
from ..cmd import Command
|
||||
@@ -65,8 +65,8 @@ class config(Command):
|
||||
include_dirs: Sequence[str] | None = None,
|
||||
libraries: Sequence[str] | None = None,
|
||||
library_dirs: Sequence[str] | None = None,
|
||||
decl: int = 0,
|
||||
call: int = 0,
|
||||
decl: bool | Literal[0, 1] = 0,
|
||||
call: bool | Literal[0, 1] = 0,
|
||||
) -> bool: ...
|
||||
def check_lib(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user