-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync vendored typeshed stubs (#14030)
Co-authored-by: typeshedbot <> Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
- Loading branch information
1 parent
48fa839
commit 7c2da4f
Showing
70 changed files
with
947 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a871efd90ca2734b3341dde98cffab66f3e08cee | ||
d262beb07502cda412db2179fb406d45d1a9486f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
crates/red_knot_vendored/vendor/typeshed/stdlib/_blake2.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import sys | ||
from _typeshed import ReadableBuffer | ||
from typing import ClassVar, final | ||
from typing_extensions import Self | ||
|
||
BLAKE2B_MAX_DIGEST_SIZE: int = 64 | ||
BLAKE2B_MAX_KEY_SIZE: int = 64 | ||
BLAKE2B_PERSON_SIZE: int = 16 | ||
BLAKE2B_SALT_SIZE: int = 16 | ||
BLAKE2S_MAX_DIGEST_SIZE: int = 32 | ||
BLAKE2S_MAX_KEY_SIZE: int = 32 | ||
BLAKE2S_PERSON_SIZE: int = 8 | ||
BLAKE2S_SALT_SIZE: int = 8 | ||
|
||
@final | ||
class blake2b: | ||
MAX_DIGEST_SIZE: ClassVar[int] = 64 | ||
MAX_KEY_SIZE: ClassVar[int] = 64 | ||
PERSON_SIZE: ClassVar[int] = 16 | ||
SALT_SIZE: ClassVar[int] = 16 | ||
block_size: int | ||
digest_size: int | ||
name: str | ||
if sys.version_info >= (3, 9): | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 64, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
usedforsecurity: bool = True, | ||
) -> None: ... | ||
else: | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 64, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
) -> None: ... | ||
|
||
def copy(self) -> Self: ... | ||
def digest(self) -> bytes: ... | ||
def hexdigest(self) -> str: ... | ||
def update(self, data: ReadableBuffer, /) -> None: ... | ||
|
||
@final | ||
class blake2s: | ||
MAX_DIGEST_SIZE: ClassVar[int] = 32 | ||
MAX_KEY_SIZE: ClassVar[int] = 32 | ||
PERSON_SIZE: ClassVar[int] = 8 | ||
SALT_SIZE: ClassVar[int] = 8 | ||
block_size: int | ||
digest_size: int | ||
name: str | ||
if sys.version_info >= (3, 9): | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 32, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
usedforsecurity: bool = True, | ||
) -> None: ... | ||
else: | ||
def __init__( | ||
self, | ||
data: ReadableBuffer = b"", | ||
/, | ||
*, | ||
digest_size: int = 32, | ||
key: ReadableBuffer = b"", | ||
salt: ReadableBuffer = b"", | ||
person: ReadableBuffer = b"", | ||
fanout: int = 1, | ||
depth: int = 1, | ||
leaf_size: int = 0, | ||
node_offset: int = 0, | ||
node_depth: int = 0, | ||
inner_size: int = 0, | ||
last_node: bool = False, | ||
) -> None: ... | ||
|
||
def copy(self) -> Self: ... | ||
def digest(self) -> bytes: ... | ||
def hexdigest(self) -> str: ... | ||
def update(self, data: ReadableBuffer, /) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
crates/red_knot_vendored/vendor/typeshed/stdlib/_frozen_importlib.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
import importlib.abc | ||
import importlib.machinery | ||
import sys | ||
import types | ||
from _typeshed.importlib import LoaderProtocol | ||
from collections.abc import Mapping, Sequence | ||
from types import ModuleType | ||
from typing import Any | ||
|
||
# Signature of `builtins.__import__` should be kept identical to `importlib.__import__` | ||
def __import__( | ||
name: str, | ||
globals: Mapping[str, object] | None = None, | ||
locals: Mapping[str, object] | None = None, | ||
fromlist: Sequence[str] = (), | ||
level: int = 0, | ||
) -> ModuleType: ... | ||
def spec_from_loader( | ||
name: str, loader: LoaderProtocol | None, *, origin: str | None = None, is_package: bool | None = None | ||
) -> importlib.machinery.ModuleSpec | None: ... | ||
def module_from_spec(spec: importlib.machinery.ModuleSpec) -> types.ModuleType: ... | ||
def _init_module_attrs( | ||
spec: importlib.machinery.ModuleSpec, module: types.ModuleType, *, override: bool = False | ||
) -> types.ModuleType: ... | ||
|
||
class ModuleSpec: | ||
def __init__( | ||
self, | ||
name: str, | ||
loader: importlib.abc.Loader | None, | ||
*, | ||
origin: str | None = None, | ||
loader_state: Any = None, | ||
is_package: bool | None = None, | ||
) -> None: ... | ||
name: str | ||
loader: importlib.abc.Loader | None | ||
origin: str | None | ||
submodule_search_locations: list[str] | None | ||
loader_state: Any | ||
cached: str | None | ||
@property | ||
def parent(self) -> str | None: ... | ||
has_location: bool | ||
def __eq__(self, other: object) -> bool: ... | ||
|
||
class BuiltinImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader): | ||
# MetaPathFinder | ||
if sys.version_info < (3, 12): | ||
@classmethod | ||
def find_module(cls, fullname: str, path: Sequence[str] | None = None) -> importlib.abc.Loader | None: ... | ||
|
||
@classmethod | ||
def find_spec( | ||
cls, fullname: str, path: Sequence[str] | None = None, target: types.ModuleType | None = None | ||
) -> ModuleSpec | None: ... | ||
# InspectLoader | ||
@classmethod | ||
def is_package(cls, fullname: str) -> bool: ... | ||
@classmethod | ||
def load_module(cls, fullname: str) -> types.ModuleType: ... | ||
@classmethod | ||
def get_code(cls, fullname: str) -> None: ... | ||
@classmethod | ||
def get_source(cls, fullname: str) -> None: ... | ||
# Loader | ||
if sys.version_info < (3, 12): | ||
@staticmethod | ||
def module_repr(module: types.ModuleType) -> str: ... | ||
if sys.version_info >= (3, 10): | ||
@staticmethod | ||
def create_module(spec: ModuleSpec) -> types.ModuleType | None: ... | ||
@staticmethod | ||
def exec_module(module: types.ModuleType) -> None: ... | ||
else: | ||
@classmethod | ||
def create_module(cls, spec: ModuleSpec) -> types.ModuleType | None: ... | ||
@classmethod | ||
def exec_module(cls, module: types.ModuleType) -> None: ... | ||
|
||
class FrozenImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader): | ||
# MetaPathFinder | ||
if sys.version_info < (3, 12): | ||
@classmethod | ||
def find_module(cls, fullname: str, path: Sequence[str] | None = None) -> importlib.abc.Loader | None: ... | ||
|
||
@classmethod | ||
def find_spec( | ||
cls, fullname: str, path: Sequence[str] | None = None, target: types.ModuleType | None = None | ||
) -> ModuleSpec | None: ... | ||
# InspectLoader | ||
@classmethod | ||
def is_package(cls, fullname: str) -> bool: ... | ||
@classmethod | ||
def load_module(cls, fullname: str) -> types.ModuleType: ... | ||
@classmethod | ||
def get_code(cls, fullname: str) -> None: ... | ||
@classmethod | ||
def get_source(cls, fullname: str) -> None: ... | ||
# Loader | ||
if sys.version_info < (3, 12): | ||
@staticmethod | ||
def module_repr(m: types.ModuleType) -> str: ... | ||
if sys.version_info >= (3, 10): | ||
@staticmethod | ||
def create_module(spec: ModuleSpec) -> types.ModuleType | None: ... | ||
else: | ||
@classmethod | ||
def create_module(cls, spec: ModuleSpec) -> types.ModuleType | None: ... | ||
|
||
@staticmethod | ||
def exec_module(module: types.ModuleType) -> None: ... |
Oops, something went wrong.