mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Upgrade black version (#7089)
This commit is contained in:
@@ -50,6 +50,7 @@ if sys.platform != "win32":
|
||||
RequestHandlerClass: Callable[..., BaseRequestHandler],
|
||||
bind_and_activate: bool = ...,
|
||||
) -> None: ...
|
||||
|
||||
class UnixDatagramServer(BaseServer):
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -113,6 +113,7 @@ if sys.platform != "win32":
|
||||
def write(self, data: bytes, flags: int = ...) -> int: ...
|
||||
def close(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
|
||||
class file_dispatcher(dispatcher):
|
||||
def __init__(self, fd: FileDescriptorLike, map: _maptype | None = ...) -> None: ...
|
||||
def set_file(self, fd: int) -> None: ...
|
||||
|
||||
@@ -2,6 +2,7 @@ import sys
|
||||
|
||||
if sys.platform == "win32":
|
||||
from distutils.cmd import Command
|
||||
|
||||
class bdist_msi(Command):
|
||||
def initialize_options(self) -> None: ...
|
||||
def finalize_options(self) -> None: ...
|
||||
|
||||
@@ -30,6 +30,7 @@ class mmap(Sequence[bytes]):
|
||||
def __init__(
|
||||
self, fileno: int, length: int, flags: int = ..., prot: int = ..., access: int = ..., offset: int = ...
|
||||
) -> None: ...
|
||||
|
||||
def close(self) -> None: ...
|
||||
def flush(self, offset: int = ..., size: int = ...) -> int: ...
|
||||
def move(self, dest: int, src: int, count: int) -> None: ...
|
||||
|
||||
@@ -21,6 +21,7 @@ if sys.platform == "win32":
|
||||
type_nullable: Literal[0x1000]
|
||||
type_key: Literal[0x2000]
|
||||
knownbits: Literal[0x3FFF]
|
||||
|
||||
class Table:
|
||||
|
||||
name: str
|
||||
@@ -29,7 +30,9 @@ if sys.platform == "win32":
|
||||
def add_field(self, index: int, name: str, type: int) -> None: ...
|
||||
def sql(self) -> str: ...
|
||||
def create(self, db: _Database) -> None: ...
|
||||
|
||||
class _Unspecified: ...
|
||||
|
||||
def change_sequence(
|
||||
seq: Sequence[tuple[str, str | None, int]],
|
||||
action: str,
|
||||
@@ -44,6 +47,7 @@ if sys.platform == "win32":
|
||||
def add_tables(db: _Database, module: ModuleType) -> None: ...
|
||||
def make_id(str: str) -> str: ...
|
||||
def gen_uuid() -> str: ...
|
||||
|
||||
class CAB:
|
||||
|
||||
name: str
|
||||
@@ -55,6 +59,7 @@ if sys.platform == "win32":
|
||||
def append(self, full: str, file: str, logical: str) -> tuple[int, str]: ...
|
||||
def commit(self, db: _Database) -> None: ...
|
||||
_directories: set[str]
|
||||
|
||||
class Directory:
|
||||
|
||||
db: _Database
|
||||
@@ -90,10 +95,12 @@ if sys.platform == "win32":
|
||||
def add_file(self, file: str, src: str | None = ..., version: str | None = ..., language: str | None = ...) -> str: ...
|
||||
def glob(self, pattern: str, exclude: Container[str] | None = ...) -> list[str]: ...
|
||||
def remove_pyc(self) -> None: ...
|
||||
|
||||
class Binary:
|
||||
|
||||
name: str
|
||||
def __init__(self, fname: str) -> None: ...
|
||||
|
||||
class Feature:
|
||||
|
||||
id: str
|
||||
@@ -110,6 +117,7 @@ if sys.platform == "win32":
|
||||
attributes: int = ...,
|
||||
) -> None: ...
|
||||
def set_current(self) -> None: ...
|
||||
|
||||
class Control:
|
||||
|
||||
dlg: Dialog
|
||||
@@ -118,12 +126,14 @@ if sys.platform == "win32":
|
||||
def event(self, event: str, argument: str, condition: str = ..., ordering: int | None = ...) -> None: ...
|
||||
def mapping(self, event: str, attribute: str) -> None: ...
|
||||
def condition(self, action: str, condition: str) -> None: ...
|
||||
|
||||
class RadioButtonGroup(Control):
|
||||
|
||||
property: str
|
||||
index: int
|
||||
def __init__(self, dlg: Dialog, name: str, property: str) -> None: ...
|
||||
def add(self, name: str, x: int, y: int, w: int, h: int, text: str, value: str | None = ...) -> None: ...
|
||||
|
||||
class Dialog:
|
||||
|
||||
db: _Database
|
||||
|
||||
@@ -5,4 +5,5 @@ if sys.platform != "win32":
|
||||
def get_default_domain() -> str: ...
|
||||
def maps(domain: str = ...) -> list[str]: ...
|
||||
def match(key: str, map: str, domain: str = ...) -> str: ...
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
@@ -235,6 +235,7 @@ if sys.platform != "win32":
|
||||
def fchown(fd: int, uid: int, gid: int) -> None: ...
|
||||
if sys.platform != "darwin":
|
||||
def fdatasync(fd: FileDescriptorLike) -> None: ... # Unix only, not Mac
|
||||
|
||||
def fpathconf(fd: int, name: str | int) -> int: ...
|
||||
def fstatvfs(fd: int) -> _StatVFS: ...
|
||||
def ftruncate(fd: int, length: int) -> None: ...
|
||||
|
||||
@@ -18,6 +18,7 @@ if sys.platform != "win32":
|
||||
RLIMIT_MEMLOCK: int
|
||||
RLIMIT_VMEM: int
|
||||
RLIMIT_AS: int
|
||||
|
||||
class _RUsage(NamedTuple):
|
||||
ru_utime: float
|
||||
ru_stime: float
|
||||
|
||||
@@ -404,6 +404,7 @@ class socket:
|
||||
def gettimeout(self) -> float | None: ...
|
||||
if sys.platform == "win32":
|
||||
def ioctl(self, control: int, option: int | tuple[int, int, int]) -> None: ...
|
||||
|
||||
def listen(self, __backlog: int) -> None: ...
|
||||
# Note that the makefile's documented windows-specific behavior is not represented
|
||||
def makefile(self, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
@@ -422,6 +423,7 @@ class socket:
|
||||
def setsockopt(self, level: int, optname: int, value: int | bytes) -> None: ...
|
||||
if sys.platform == "win32":
|
||||
def share(self, process_id: int) -> bytes: ...
|
||||
|
||||
def shutdown(self, how: int) -> None: ...
|
||||
|
||||
# ----- Functions -----
|
||||
|
||||
@@ -243,4 +243,5 @@ if sys.platform != "win32":
|
||||
def tcdrain(__fd: FileDescriptorLike) -> None: ...
|
||||
def tcflush(__fd: FileDescriptorLike, __queue: int) -> None: ...
|
||||
def tcflow(__fd: FileDescriptorLike, __action: int) -> None: ...
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
@@ -91,6 +91,7 @@ if sys.platform == "darwin":
|
||||
name: str
|
||||
def __init__(self, name: Text) -> None: ...
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
class MacOSXOSAScript(BaseBrowser):
|
||||
def __init__(self, name: Text) -> None: ...
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user