mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add defaults for third-party stubs A-D (#9952)
This commit is contained in:
@@ -21,14 +21,18 @@ class DateTimeRange:
|
||||
separator: str
|
||||
def __init__(
|
||||
self,
|
||||
start_datetime: datetime.datetime | str | None = ...,
|
||||
end_datetime: datetime.datetime | str | None = ...,
|
||||
start_time_format: str = ...,
|
||||
end_time_format: str = ...,
|
||||
start_datetime: datetime.datetime | str | None = None,
|
||||
end_datetime: datetime.datetime | str | None = None,
|
||||
start_time_format: str = "%Y-%m-%dT%H:%M:%S%z",
|
||||
end_time_format: str = "%Y-%m-%dT%H:%M:%S%z",
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_range_text(
|
||||
cls, range_text: str, separator: str = ..., start_time_format: str | None = ..., end_time_format: str | None = ...
|
||||
cls,
|
||||
range_text: str,
|
||||
separator: str = "\\s+\\-\\s+",
|
||||
start_time_format: str | None = None,
|
||||
end_time_format: str | None = None,
|
||||
) -> DateTimeRange: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
@@ -50,8 +54,8 @@ class DateTimeRange:
|
||||
def get_start_time_str(self) -> str: ...
|
||||
def get_end_time_str(self) -> str: ...
|
||||
def get_timedelta_second(self) -> float: ...
|
||||
def set_start_datetime(self, value: datetime.datetime | str | None, timezone: str | None = ...) -> None: ...
|
||||
def set_end_datetime(self, value: datetime.datetime | str | None, timezone: str | None = ...) -> None: ...
|
||||
def set_start_datetime(self, value: datetime.datetime | str | None, timezone: str | None = None) -> None: ...
|
||||
def set_end_datetime(self, value: datetime.datetime | str | None, timezone: str | None = None) -> None: ...
|
||||
def set_time_range(self, start: datetime.datetime | str | None, end: datetime.datetime | str | None) -> None: ...
|
||||
def range(self, step: datetime.timedelta | relativedelta) -> Iterable[datetime.datetime]: ...
|
||||
def intersection(self, x: DateTimeRange, intersection_threshold: datetime.timedelta | None = None) -> DateTimeRange: ...
|
||||
|
||||
@@ -13,7 +13,7 @@ class ClassicAdapter:
|
||||
action: _Actions | None
|
||||
category: type[Warning]
|
||||
def __init__(
|
||||
self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: type[Warning] = ...
|
||||
self, reason: str = "", version: str = "", action: _Actions | None = None, category: type[Warning] = ...
|
||||
) -> None: ...
|
||||
def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
|
||||
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
|
||||
|
||||
@@ -15,20 +15,20 @@ class SphinxAdapter(ClassicAdapter):
|
||||
def __init__(
|
||||
self,
|
||||
directive: Literal["versionadded", "versionchanged", "deprecated"],
|
||||
reason: str = ...,
|
||||
version: str = ...,
|
||||
action: _Actions | None = ...,
|
||||
reason: str = "",
|
||||
version: str = "",
|
||||
action: _Actions | None = None,
|
||||
category: type[Warning] = ...,
|
||||
line_length: int = ...,
|
||||
line_length: int = 70,
|
||||
) -> None: ...
|
||||
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
|
||||
|
||||
def versionadded(reason: str = ..., version: str = ..., line_length: int = ...) -> Callable[[_F], _F]: ...
|
||||
def versionchanged(reason: str = ..., version: str = ..., line_length: int = ...) -> Callable[[_F], _F]: ...
|
||||
def versionadded(reason: str = "", version: str = "", line_length: int = 70) -> Callable[[_F], _F]: ...
|
||||
def versionchanged(reason: str = "", version: str = "", line_length: int = 70) -> Callable[[_F], _F]: ...
|
||||
def deprecated(
|
||||
reason: str = ...,
|
||||
version: str = ...,
|
||||
line_length: int = ...,
|
||||
reason: str = "",
|
||||
version: str = "",
|
||||
line_length: int = 70,
|
||||
*,
|
||||
action: _Actions | None = ...,
|
||||
category: type[Warning] | None = ...,
|
||||
|
||||
@@ -19,7 +19,7 @@ class AsyncIndirectBase(AsyncBase[_T]):
|
||||
class AiofilesContextManager(Generic[_T_co, _T_contra, _V_co]):
|
||||
def __init__(self, coro: Coroutine[_T_co, _T_contra, _V_co]) -> None: ...
|
||||
def send(self, value: _T_contra) -> _T_co: ...
|
||||
def throw(self, typ: type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ...) -> _T_co: ...
|
||||
def throw(self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None) -> _T_co: ...
|
||||
def close(self) -> None: ...
|
||||
@property
|
||||
def gi_frame(self) -> FrameType: ...
|
||||
|
||||
@@ -12,8 +12,8 @@ path = ospath
|
||||
async def stat(
|
||||
path: FileDescriptorOrPath,
|
||||
*,
|
||||
dir_fd: int | None = ...,
|
||||
follow_symlinks: bool = ...,
|
||||
dir_fd: int | None = None,
|
||||
follow_symlinks: bool = True,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Any = ...,
|
||||
) -> stat_result: ...
|
||||
@@ -21,8 +21,8 @@ async def rename(
|
||||
src: StrOrBytesPath,
|
||||
dst: StrOrBytesPath,
|
||||
*,
|
||||
src_dir_fd: int | None = ...,
|
||||
dst_dir_fd: int | None = ...,
|
||||
src_dir_fd: int | None = None,
|
||||
dst_dir_fd: int | None = None,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Any = ...,
|
||||
) -> None: ...
|
||||
@@ -30,26 +30,26 @@ async def replace(
|
||||
src: StrOrBytesPath,
|
||||
dst: StrOrBytesPath,
|
||||
*,
|
||||
src_dir_fd: int | None = ...,
|
||||
dst_dir_fd: int | None = ...,
|
||||
src_dir_fd: int | None = None,
|
||||
dst_dir_fd: int | None = None,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Any = ...,
|
||||
) -> None: ...
|
||||
async def remove(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
) -> None: ...
|
||||
async def mkdir(
|
||||
path: StrOrBytesPath, mode: int = ..., *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
path: StrOrBytesPath, mode: int = 511, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
) -> None: ...
|
||||
async def makedirs(
|
||||
name: StrOrBytesPath, mode: int = ..., exist_ok: bool = ..., *, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
name: StrOrBytesPath, mode: int = 511, exist_ok: bool = False, *, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
) -> None: ...
|
||||
async def rmdir(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
) -> None: ...
|
||||
async def removedirs(name: StrOrBytesPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> None: ...
|
||||
@overload
|
||||
async def scandir(path: None = ..., *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> _ScandirIterator[str]: ...
|
||||
async def scandir(path: None = None, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> _ScandirIterator[str]: ...
|
||||
@overload
|
||||
async def scandir(path: int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> _ScandirIterator[str]: ...
|
||||
@overload
|
||||
|
||||
@@ -26,15 +26,15 @@ _T_contra = TypeVar("_T_contra", contravariant=True)
|
||||
@overload
|
||||
def NamedTemporaryFile(
|
||||
mode: OpenTextMode,
|
||||
buffering: int = ...,
|
||||
encoding: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
delete: bool = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: int = -1,
|
||||
encoding: str | None = None,
|
||||
newline: str | None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
delete: bool = True,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncTextIOWrapper]: ...
|
||||
|
||||
# Unbuffered binary: returns a FileIO
|
||||
@@ -42,58 +42,58 @@ def NamedTemporaryFile(
|
||||
def NamedTemporaryFile(
|
||||
mode: OpenBinaryMode,
|
||||
buffering: Literal[0],
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
delete: bool = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
delete: bool = True,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncFileIO]: ...
|
||||
|
||||
# Buffered binary reading/updating: AsyncBufferedReader
|
||||
@overload
|
||||
def NamedTemporaryFile(
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating = ...,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
delete: bool = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating = "w+b",
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
delete: bool = True,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedReader]: ...
|
||||
|
||||
# Buffered binary writing: AsyncBufferedIOBase
|
||||
@overload
|
||||
def NamedTemporaryFile(
|
||||
mode: OpenBinaryModeWriting,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
delete: bool = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
delete: bool = True,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedIOBase]: ...
|
||||
|
||||
# Text mode: always returns AsyncTextIOWrapper
|
||||
@overload
|
||||
def TemporaryFile(
|
||||
mode: OpenTextMode,
|
||||
buffering: int = ...,
|
||||
encoding: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: int = -1,
|
||||
encoding: str | None = None,
|
||||
newline: str | None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncTextIOWrapper]: ...
|
||||
|
||||
# Unbuffered binary: returns a FileIO
|
||||
@@ -101,159 +101,159 @@ def TemporaryFile(
|
||||
def TemporaryFile(
|
||||
mode: OpenBinaryMode,
|
||||
buffering: Literal[0],
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncFileIO]: ...
|
||||
|
||||
# Buffered binary reading/updating: AsyncBufferedReader
|
||||
@overload
|
||||
def TemporaryFile(
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating = ...,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating = "w+b",
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedReader]: ...
|
||||
|
||||
# Buffered binary writing: AsyncBufferedIOBase
|
||||
@overload
|
||||
def TemporaryFile(
|
||||
mode: OpenBinaryModeWriting,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedIOBase]: ...
|
||||
|
||||
# Text mode: always returns AsyncTextIOWrapper
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int = ...,
|
||||
max_size: int = 0,
|
||||
*,
|
||||
mode: OpenTextMode,
|
||||
buffering: int = ...,
|
||||
encoding: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: int = -1,
|
||||
encoding: str | None = None,
|
||||
newline: str | None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncTextIOWrapper]: ...
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int,
|
||||
mode: OpenTextMode,
|
||||
buffering: int = ...,
|
||||
encoding: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: int = -1,
|
||||
encoding: str | None = None,
|
||||
newline: str | None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncTextIOWrapper]: ...
|
||||
|
||||
# Unbuffered binary: returns a FileIO
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int = ...,
|
||||
mode: OpenBinaryMode = ...,
|
||||
max_size: int = 0,
|
||||
mode: OpenBinaryMode = "w+b",
|
||||
*,
|
||||
buffering: Literal[0],
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncFileIO]: ...
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int,
|
||||
mode: OpenBinaryMode,
|
||||
buffering: Literal[0],
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncFileIO]: ...
|
||||
|
||||
# Buffered binary reading/updating: AsyncBufferedReader
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int = ...,
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating = ...,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
max_size: int = 0,
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating = "w+b",
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedReader]: ...
|
||||
|
||||
# Buffered binary writing: AsyncBufferedIOBase
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int = ...,
|
||||
max_size: int = 0,
|
||||
*,
|
||||
mode: OpenBinaryModeWriting,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedIOBase]: ...
|
||||
@overload
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int,
|
||||
mode: OpenBinaryModeWriting,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
newline: None = ...,
|
||||
suffix: AnyStr | None = ...,
|
||||
prefix: AnyStr | None = ...,
|
||||
dir: StrOrBytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
newline: None = None,
|
||||
suffix: AnyStr | None = None,
|
||||
prefix: AnyStr | None = None,
|
||||
dir: StrOrBytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedIOBase]: ...
|
||||
@overload
|
||||
def TemporaryDirectory(
|
||||
suffix: str | None = ...,
|
||||
prefix: str | None = ...,
|
||||
dir: StrPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
suffix: str | None = None,
|
||||
prefix: str | None = None,
|
||||
dir: StrPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManagerTempDir[None, None, AsyncTemporaryDirectory]: ...
|
||||
@overload
|
||||
def TemporaryDirectory(
|
||||
suffix: bytes | None = ...,
|
||||
prefix: bytes | None = ...,
|
||||
dir: BytesPath | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
suffix: bytes | None = None,
|
||||
prefix: bytes | None = None,
|
||||
dir: BytesPath | None = None,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManagerTempDir[None, None, AsyncTemporaryDirectory]: ...
|
||||
|
||||
class AiofilesContextManagerTempDir(AiofilesContextManager[_T_co, _T_contra, _V_co]):
|
||||
|
||||
@@ -22,16 +22,16 @@ _Opener: TypeAlias = Callable[[str, int], int]
|
||||
@overload
|
||||
def open(
|
||||
file: FileDescriptorOrPath,
|
||||
mode: OpenTextMode = ...,
|
||||
buffering: int = ...,
|
||||
encoding: str | None = ...,
|
||||
errors: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
closefd: bool = ...,
|
||||
opener: _Opener | None = ...,
|
||||
mode: OpenTextMode = "r",
|
||||
buffering: int = -1,
|
||||
encoding: str | None = None,
|
||||
errors: str | None = None,
|
||||
newline: str | None = None,
|
||||
closefd: bool = True,
|
||||
opener: _Opener | None = None,
|
||||
*,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncTextIOWrapper]: ...
|
||||
|
||||
# Unbuffered binary: returns a FileIO
|
||||
@@ -40,14 +40,14 @@ def open(
|
||||
file: FileDescriptorOrPath,
|
||||
mode: OpenBinaryMode,
|
||||
buffering: Literal[0],
|
||||
encoding: None = ...,
|
||||
errors: None = ...,
|
||||
newline: None = ...,
|
||||
closefd: bool = ...,
|
||||
opener: _Opener | None = ...,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
newline: None = None,
|
||||
closefd: bool = True,
|
||||
opener: _Opener | None = None,
|
||||
*,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncFileIO]: ...
|
||||
|
||||
# Buffered binary reading/updating: AsyncBufferedReader
|
||||
@@ -55,15 +55,15 @@ def open(
|
||||
def open(
|
||||
file: FileDescriptorOrPath,
|
||||
mode: OpenBinaryModeReading | OpenBinaryModeUpdating,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
errors: None = ...,
|
||||
newline: None = ...,
|
||||
closefd: bool = ...,
|
||||
opener: _Opener | None = ...,
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
newline: None = None,
|
||||
closefd: bool = True,
|
||||
opener: _Opener | None = None,
|
||||
*,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedReader]: ...
|
||||
|
||||
# Buffered binary writing: AsyncBufferedIOBase
|
||||
@@ -71,15 +71,15 @@ def open(
|
||||
def open(
|
||||
file: FileDescriptorOrPath,
|
||||
mode: OpenBinaryModeWriting,
|
||||
buffering: Literal[-1, 1] = ...,
|
||||
encoding: None = ...,
|
||||
errors: None = ...,
|
||||
newline: None = ...,
|
||||
closefd: bool = ...,
|
||||
opener: _Opener | None = ...,
|
||||
buffering: Literal[-1, 1] = -1,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
newline: None = None,
|
||||
closefd: bool = True,
|
||||
opener: _Opener | None = None,
|
||||
*,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, AsyncBufferedIOBase]: ...
|
||||
|
||||
# Buffering cannot be determined: fall back to _UnknownAsyncBinaryIO
|
||||
@@ -87,15 +87,15 @@ def open(
|
||||
def open(
|
||||
file: FileDescriptorOrPath,
|
||||
mode: OpenBinaryMode,
|
||||
buffering: int = ...,
|
||||
encoding: None = ...,
|
||||
errors: None = ...,
|
||||
newline: None = ...,
|
||||
closefd: bool = ...,
|
||||
opener: _Opener | None = ...,
|
||||
buffering: int = -1,
|
||||
encoding: None = None,
|
||||
errors: None = None,
|
||||
newline: None = None,
|
||||
closefd: bool = True,
|
||||
opener: _Opener | None = None,
|
||||
*,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Incomplete | None = ...,
|
||||
loop: AbstractEventLoop | None = None,
|
||||
executor: Incomplete | None = None,
|
||||
) -> AiofilesContextManager[None, None, _UnknownAsyncBinaryIO]: ...
|
||||
|
||||
stdin: AsyncTextIndirectIOWrapper
|
||||
|
||||
@@ -10,7 +10,7 @@ class Annoy:
|
||||
def load(self, fn: str, prefault: bool = ...) -> Literal[True]: ...
|
||||
def save(self, fn: str, prefault: bool = ...) -> Literal[True]: ...
|
||||
@overload
|
||||
def get_nns_by_item(self, i: int, n: int, search_k: int = ..., include_distances: Literal[False] = ...) -> list[int]: ...
|
||||
def get_nns_by_item(self, i: int, n: int, search_k: int = ..., include_distances: Literal[False] = False) -> list[int]: ...
|
||||
@overload
|
||||
def get_nns_by_item(
|
||||
self, i: int, n: int, search_k: int, include_distances: Literal[True]
|
||||
@@ -21,7 +21,7 @@ class Annoy:
|
||||
) -> tuple[list[int], list[float]]: ...
|
||||
@overload
|
||||
def get_nns_by_vector(
|
||||
self, vector: _Vector, n: int, search_k: int = ..., include_distances: Literal[False] = ...
|
||||
self, vector: _Vector, n: int, search_k: int = ..., include_distances: Literal[False] = False
|
||||
) -> list[int]: ...
|
||||
@overload
|
||||
def get_nns_by_vector(
|
||||
|
||||
@@ -3,11 +3,11 @@ from _typeshed import Incomplete
|
||||
from .context import Context as _Context
|
||||
|
||||
class AsyncContext(_Context):
|
||||
def __init__(self, *args, loop: Incomplete | None = ..., use_task_factory: bool = ..., **kwargs) -> None: ...
|
||||
def __init__(self, *args, loop: Incomplete | None = None, use_task_factory: bool = True, **kwargs) -> None: ...
|
||||
def clear_trace_entities(self) -> None: ...
|
||||
|
||||
class TaskLocalStorage:
|
||||
def __init__(self, loop: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, loop: Incomplete | None = None) -> None: ...
|
||||
def __setattr__(self, name: str, value) -> None: ...
|
||||
def __getattribute__(self, item: str): ...
|
||||
def clear(self) -> None: ...
|
||||
|
||||
@@ -24,7 +24,7 @@ class AsyncSubsegmentContextManager(SubsegmentContextManager):
|
||||
) -> None: ...
|
||||
|
||||
class AsyncAWSXRayRecorder(AWSXRayRecorder):
|
||||
def capture_async(self, name: Incomplete | None = ...): ...
|
||||
def in_segment_async(self, name: Incomplete | None = ..., **segment_kwargs): ...
|
||||
def in_subsegment_async(self, name: Incomplete | None = ..., **subsegment_kwargs): ...
|
||||
def capture_async(self, name: Incomplete | None = None): ...
|
||||
def in_segment_async(self, name: Incomplete | None = None, **segment_kwargs): ...
|
||||
def in_subsegment_async(self, name: Incomplete | None = None, **subsegment_kwargs): ...
|
||||
async def record_subsegment_async(self, wrapped, instance, args, kwargs, name, namespace, meta_processor): ...
|
||||
|
||||
@@ -15,11 +15,11 @@ MISSING_SEGMENT_MSG: str
|
||||
CXT_MISSING_STRATEGY_KEY: str
|
||||
|
||||
class Context:
|
||||
def __init__(self, context_missing: str = ...) -> None: ...
|
||||
def __init__(self, context_missing: str = "RUNTIME_ERROR") -> None: ...
|
||||
def put_segment(self, segment: Segment) -> None: ...
|
||||
def end_segment(self, end_time: time.struct_time | None = ...) -> None: ...
|
||||
def end_segment(self, end_time: time.struct_time | None = None) -> None: ...
|
||||
def put_subsegment(self, subsegment: Subsegment) -> None: ...
|
||||
def end_subsegment(self, end_time: time.struct_time | None = ...): ...
|
||||
def end_subsegment(self, end_time: time.struct_time | None = None): ...
|
||||
def get_trace_entity(self): ...
|
||||
def set_trace_entity(self, trace_entity: Entity) -> None: ...
|
||||
def clear_trace_entities(self) -> None: ...
|
||||
|
||||
@@ -4,7 +4,7 @@ DAEMON_ADDRESS_KEY: str
|
||||
DEFAULT_ADDRESS: str
|
||||
|
||||
class DaemonConfig:
|
||||
def __init__(self, daemon_address=...) -> None: ...
|
||||
def __init__(self, daemon_address="127.0.0.1:2000") -> None: ...
|
||||
@property
|
||||
def udp_ip(self): ...
|
||||
@property
|
||||
|
||||
@@ -10,7 +10,7 @@ PROTOCOL_DELIMITER: str
|
||||
DEFAULT_DAEMON_ADDRESS: str
|
||||
|
||||
class UDPEmitter:
|
||||
def __init__(self, daemon_address=...) -> None: ...
|
||||
def __init__(self, daemon_address="127.0.0.1:2000") -> None: ...
|
||||
def send_entity(self, entity) -> None: ...
|
||||
def set_daemon_address(self, address) -> None: ...
|
||||
@property
|
||||
|
||||
@@ -18,7 +18,7 @@ def check_in_lambda(): ...
|
||||
class LambdaContext(Context):
|
||||
def __init__(self) -> None: ...
|
||||
def put_segment(self, segment) -> None: ...
|
||||
def end_segment(self, end_time: Incomplete | None = ...) -> None: ...
|
||||
def end_segment(self, end_time: Incomplete | None = None) -> None: ...
|
||||
def put_subsegment(self, subsegment) -> None: ...
|
||||
def get_trace_entity(self): ...
|
||||
@property
|
||||
|
||||
@@ -5,25 +5,25 @@ from .traceid import TraceId as TraceId
|
||||
|
||||
class DummySegment(Segment):
|
||||
sampled: bool
|
||||
def __init__(self, name: str = ...) -> None: ...
|
||||
def __init__(self, name: str = "dummy") -> None: ...
|
||||
def set_aws(self, aws_meta) -> None: ...
|
||||
def put_http_meta(self, key, value) -> None: ...
|
||||
def put_annotation(self, key, value) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = ...) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = "default") -> None: ...
|
||||
def set_user(self, user) -> None: ...
|
||||
def set_service(self, service_info) -> None: ...
|
||||
def apply_status_code(self, status_code) -> None: ...
|
||||
def add_exception(self, exception, stack, remote: bool = ...) -> None: ...
|
||||
def add_exception(self, exception, stack, remote: bool = False) -> None: ...
|
||||
def serialize(self) -> None: ...
|
||||
|
||||
class DummySubsegment(Subsegment):
|
||||
sampled: bool
|
||||
def __init__(self, segment, name: str = ...) -> None: ...
|
||||
def __init__(self, segment, name: str = "dummy") -> None: ...
|
||||
def set_aws(self, aws_meta) -> None: ...
|
||||
def put_http_meta(self, key, value) -> None: ...
|
||||
def put_annotation(self, key, value) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = ...) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = "default") -> None: ...
|
||||
def set_sql(self, sql) -> None: ...
|
||||
def apply_status_code(self, status_code) -> None: ...
|
||||
def add_exception(self, exception, stack, remote: bool = ...) -> None: ...
|
||||
def add_exception(self, exception, stack, remote: bool = False) -> None: ...
|
||||
def serialize(self) -> None: ...
|
||||
|
||||
@@ -26,13 +26,13 @@ class Entity:
|
||||
cause: Any
|
||||
subsegments: Any
|
||||
end_time: Any
|
||||
def __init__(self, name, entity_id: Incomplete | None = ...) -> None: ...
|
||||
def close(self, end_time: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, name, entity_id: Incomplete | None = None) -> None: ...
|
||||
def close(self, end_time: Incomplete | None = None) -> None: ...
|
||||
def add_subsegment(self, subsegment) -> None: ...
|
||||
def remove_subsegment(self, subsegment) -> None: ...
|
||||
def put_http_meta(self, key, value) -> None: ...
|
||||
def put_annotation(self, key, value) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = ...) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = "default") -> None: ...
|
||||
def set_aws(self, aws_meta) -> None: ...
|
||||
throttle: bool
|
||||
def add_throttle_flag(self) -> None: ...
|
||||
@@ -41,7 +41,7 @@ class Entity:
|
||||
error: bool
|
||||
def add_error_flag(self) -> None: ...
|
||||
def apply_status_code(self, status_code) -> None: ...
|
||||
def add_exception(self, exception: Exception, stack: StackSummary, remote: bool = ...) -> None: ...
|
||||
def add_exception(self, exception: Exception, stack: StackSummary, remote: bool = False) -> None: ...
|
||||
def save_origin_trace_header(self, trace_header) -> None: ...
|
||||
def get_origin_trace_header(self): ...
|
||||
def serialize(self): ...
|
||||
|
||||
@@ -9,16 +9,16 @@ MUTATION_UNSUPPORTED_MESSAGE: str
|
||||
class FacadeSegment(Segment):
|
||||
initializing: Any
|
||||
def __init__(self, name, entityid, traceid, sampled) -> None: ...
|
||||
def close(self, end_time: Incomplete | None = ...) -> None: ...
|
||||
def close(self, end_time: Incomplete | None = None) -> None: ...
|
||||
def put_http_meta(self, key, value) -> None: ...
|
||||
def put_annotation(self, key, value) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = ...) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = "default") -> None: ...
|
||||
def set_aws(self, aws_meta) -> None: ...
|
||||
def set_user(self, user) -> None: ...
|
||||
def add_throttle_flag(self) -> None: ...
|
||||
def add_fault_flag(self) -> None: ...
|
||||
def add_error_flag(self) -> None: ...
|
||||
def add_exception(self, exception, stack, remote: bool = ...) -> None: ...
|
||||
def add_exception(self, exception, stack, remote: bool = False) -> None: ...
|
||||
def apply_status_code(self, status_code) -> None: ...
|
||||
def serialize(self) -> None: ...
|
||||
def ready_to_send(self): ...
|
||||
|
||||
@@ -15,7 +15,7 @@ class SegmentContextManager:
|
||||
segment_kwargs: dict[str, Any]
|
||||
recorder: AWSXRayRecorder
|
||||
segment: Segment
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: str | None = ..., **segment_kwargs) -> None: ...
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: str | None = None, **segment_kwargs) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
@@ -31,7 +31,7 @@ class Segment(Entity):
|
||||
parent_id: str | None
|
||||
service: dict[str, str]
|
||||
def __init__(
|
||||
self, name, entityid: str | None = ..., traceid: str | None = ..., parent_id: str | None = ..., sampled: bool = ...
|
||||
self, name, entityid: str | None = None, traceid: str | None = None, parent_id: str | None = None, sampled: bool = True
|
||||
) -> None: ...
|
||||
def add_subsegment(self, subsegment: Subsegment) -> None: ...
|
||||
def increment(self) -> None: ...
|
||||
|
||||
@@ -19,7 +19,7 @@ class SubsegmentContextManager:
|
||||
subsegment_kwargs: dict[str, Any] | None
|
||||
recorder: AWSXRayRecorder
|
||||
subsegment: Subsegment
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: Incomplete | None = ..., **subsegment_kwargs) -> None: ...
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: Incomplete | None = None, **subsegment_kwargs) -> None: ...
|
||||
def __call__(self, wrapped, instance, args: list[Any], kwargs: dict[str, Any]): ...
|
||||
def __enter__(self) -> Subsegment: ...
|
||||
def __exit__(
|
||||
@@ -35,6 +35,6 @@ class Subsegment(Entity):
|
||||
def __init__(self, name: str, namespace: str, segment: Segment) -> None: ...
|
||||
def add_subsegment(self, subsegment: Subsegment) -> None: ...
|
||||
def remove_subsegment(self, subsegment: Subsegment) -> None: ...
|
||||
def close(self, end_time: time.struct_time | None = ...) -> None: ...
|
||||
def close(self, end_time: time.struct_time | None = None) -> None: ...
|
||||
def set_sql(self, sql: dict[str, Any]) -> None: ...
|
||||
def to_dict(self) -> dict[str, Any]: ...
|
||||
|
||||
@@ -10,5 +10,5 @@ class Throwable:
|
||||
type: Any
|
||||
remote: Any
|
||||
stack: Any
|
||||
def __init__(self, exception, stack, remote: bool = ...) -> None: ...
|
||||
def __init__(self, exception, stack, remote: bool = False) -> None: ...
|
||||
def to_dict(self): ...
|
||||
|
||||
@@ -10,7 +10,7 @@ HEADER_DELIMITER: str
|
||||
|
||||
class TraceHeader:
|
||||
def __init__(
|
||||
self, root: str | None = ..., parent: str | None = ..., sampled: bool | None = ..., data: dict[str, Any] | None = ...
|
||||
self, root: str | None = None, parent: str | None = None, sampled: bool | None = None, data: dict[str, Any] | None = None
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_header_str(cls, header) -> Self: ...
|
||||
|
||||
@@ -10,5 +10,5 @@ log: Logger
|
||||
SUPPORTED_MODULES: Any
|
||||
NO_DOUBLE_PATCH: Any
|
||||
|
||||
def patch_all(double_patch: bool = ...) -> None: ...
|
||||
def patch(modules_to_patch: Iterable[str], raise_errors: bool = ..., ignore_module_patterns: str | None = ...) -> None: ...
|
||||
def patch_all(double_patch: bool = False) -> None: ...
|
||||
def patch(modules_to_patch: Iterable[str], raise_errors: bool = True, ignore_module_patterns: str | None = None) -> None: ...
|
||||
|
||||
@@ -8,6 +8,6 @@ IMDS_URL: str
|
||||
|
||||
def initialize() -> None: ...
|
||||
def get_token(): ...
|
||||
def get_metadata(token: Incomplete | None = ...): ...
|
||||
def get_metadata(token: Incomplete | None = None): ...
|
||||
def parse_metadata_json(json_str): ...
|
||||
def do_request(url, headers: Incomplete | None = ..., method: str = ...): ...
|
||||
def do_request(url, headers: Incomplete | None = None, method: str = "GET"): ...
|
||||
|
||||
@@ -36,39 +36,39 @@ class AWSXRayRecorder:
|
||||
def __init__(self) -> None: ...
|
||||
def configure(
|
||||
self,
|
||||
sampling: bool | None = ...,
|
||||
plugins: Iterable[str] | None = ...,
|
||||
context_missing: str | None = ...,
|
||||
sampling_rules: dict[str, Any] | str | None = ...,
|
||||
daemon_address: str | None = ...,
|
||||
service: str | None = ...,
|
||||
context: Context | None = ...,
|
||||
emitter: UDPEmitter | None = ...,
|
||||
streaming: DefaultStreaming | None = ...,
|
||||
dynamic_naming: DefaultDynamicNaming | None = ...,
|
||||
streaming_threshold: int | None = ...,
|
||||
max_trace_back: int | None = ...,
|
||||
sampler: LocalSampler | DefaultSampler | None = ...,
|
||||
stream_sql: bool | None = ...,
|
||||
sampling: bool | None = None,
|
||||
plugins: Iterable[str] | None = None,
|
||||
context_missing: str | None = None,
|
||||
sampling_rules: dict[str, Any] | str | None = None,
|
||||
daemon_address: str | None = None,
|
||||
service: str | None = None,
|
||||
context: Context | None = None,
|
||||
emitter: UDPEmitter | None = None,
|
||||
streaming: DefaultStreaming | None = None,
|
||||
dynamic_naming: DefaultDynamicNaming | None = None,
|
||||
streaming_threshold: int | None = None,
|
||||
max_trace_back: int | None = None,
|
||||
sampler: LocalSampler | DefaultSampler | None = None,
|
||||
stream_sql: bool | None = True,
|
||||
) -> None: ...
|
||||
def in_segment(self, name: str | None = ..., **segment_kwargs) -> SegmentContextManager: ...
|
||||
def in_subsegment(self, name: str | None = ..., **subsegment_kwargs) -> SubsegmentContextManager: ...
|
||||
def in_segment(self, name: str | None = None, **segment_kwargs) -> SegmentContextManager: ...
|
||||
def in_subsegment(self, name: str | None = None, **subsegment_kwargs) -> SubsegmentContextManager: ...
|
||||
def begin_segment(
|
||||
self, name: str | None = ..., traceid: str | None = ..., parent_id: str | None = ..., sampling: bool | None = ...
|
||||
self, name: str | None = None, traceid: str | None = None, parent_id: str | None = None, sampling: bool | None = None
|
||||
) -> Segment | DummySegment: ...
|
||||
def end_segment(self, end_time: time.struct_time | None = ...) -> None: ...
|
||||
def end_segment(self, end_time: time.struct_time | None = None) -> None: ...
|
||||
def current_segment(self) -> Segment: ...
|
||||
def begin_subsegment(self, name: str, namespace: str = ...) -> DummySubsegment | Subsegment | None: ...
|
||||
def begin_subsegment(self, name: str, namespace: str = "local") -> DummySubsegment | Subsegment | None: ...
|
||||
def current_subsegment(self) -> Subsegment | DummySubsegment | None: ...
|
||||
def end_subsegment(self, end_time: time.struct_time | None = ...) -> None: ...
|
||||
def end_subsegment(self, end_time: time.struct_time | None = None) -> None: ...
|
||||
def put_annotation(self, key: str, value: Any) -> None: ...
|
||||
def put_metadata(self, key: str, value: Any, namespace: str = ...) -> None: ...
|
||||
def put_metadata(self, key: str, value: Any, namespace: str = "default") -> None: ...
|
||||
def is_sampled(self) -> bool: ...
|
||||
def get_trace_entity(self) -> Segment | Subsegment | DummySegment | DummySubsegment: ...
|
||||
def set_trace_entity(self, trace_entity: Segment | Subsegment | DummySegment | DummySubsegment) -> None: ...
|
||||
def clear_trace_entities(self) -> None: ...
|
||||
def stream_subsegments(self) -> None: ...
|
||||
def capture(self, name: str | None = ...) -> SubsegmentContextManager: ...
|
||||
def capture(self, name: str | None = None) -> SubsegmentContextManager: ...
|
||||
def record_subsegment(
|
||||
self,
|
||||
wrapped: Callable[..., Any],
|
||||
|
||||
@@ -4,5 +4,5 @@ class Reservoir:
|
||||
traces_per_sec: Any
|
||||
used_this_sec: int
|
||||
this_sec: Any
|
||||
def __init__(self, traces_per_sec: int = ...) -> None: ...
|
||||
def __init__(self, traces_per_sec: int = 0) -> None: ...
|
||||
def take(self): ...
|
||||
|
||||
@@ -9,5 +9,5 @@ SUPPORTED_RULE_VERSION: Any
|
||||
|
||||
class LocalSampler:
|
||||
def __init__(self, rules=...) -> None: ...
|
||||
def should_trace(self, sampling_req: Incomplete | None = ...): ...
|
||||
def should_trace(self, sampling_req: Incomplete | None = None): ...
|
||||
def load_local_rules(self, rules) -> None: ...
|
||||
|
||||
@@ -10,7 +10,7 @@ class SamplingRule:
|
||||
METHOD: str
|
||||
PATH: str
|
||||
SERVICE_NAME: str
|
||||
def __init__(self, rule_dict, version: int = ..., default: bool = ...) -> None: ...
|
||||
def __init__(self, rule_dict, version: int = 2, default: bool = False) -> None: ...
|
||||
def applies(self, host, method, path): ...
|
||||
@property
|
||||
def fixed_target(self): ...
|
||||
|
||||
@@ -13,9 +13,9 @@ log: Any
|
||||
class DefaultSampler:
|
||||
def __init__(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def should_trace(self, sampling_req: Incomplete | None = ...): ...
|
||||
def should_trace(self, sampling_req: Incomplete | None = None): ...
|
||||
def load_local_rules(self, rules) -> None: ...
|
||||
def load_settings(self, daemon_config, context, origin: Incomplete | None = ...) -> None: ...
|
||||
def load_settings(self, daemon_config, context, origin: Incomplete | None = None) -> None: ...
|
||||
@property
|
||||
def xray_client(self): ...
|
||||
@xray_client.setter
|
||||
|
||||
@@ -10,11 +10,11 @@ class SamplingRule:
|
||||
priority,
|
||||
rate,
|
||||
reservoir_size,
|
||||
host: Incomplete | None = ...,
|
||||
method: Incomplete | None = ...,
|
||||
path: Incomplete | None = ...,
|
||||
service: Incomplete | None = ...,
|
||||
service_type: Incomplete | None = ...,
|
||||
host: Incomplete | None = None,
|
||||
method: Incomplete | None = None,
|
||||
path: Incomplete | None = None,
|
||||
service: Incomplete | None = None,
|
||||
service_type: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def match(self, sampling_req): ...
|
||||
def is_default(self): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class DefaultStreaming:
|
||||
def __init__(self, streaming_threshold: int = ...) -> None: ...
|
||||
def __init__(self, streaming_threshold: int = 30) -> None: ...
|
||||
def is_eligible(self, segment): ...
|
||||
def stream(self, entity, callback) -> None: ...
|
||||
@property
|
||||
|
||||
@@ -2,8 +2,8 @@ from typing import Any
|
||||
|
||||
class AtomicCounter:
|
||||
value: Any
|
||||
def __init__(self, initial: int = ...) -> None: ...
|
||||
def increment(self, num: int = ...): ...
|
||||
def decrement(self, num: int = ...): ...
|
||||
def __init__(self, initial: int = 0) -> None: ...
|
||||
def increment(self, num: int = 1): ...
|
||||
def decrement(self, num: int = 1): ...
|
||||
def get_current(self): ...
|
||||
def reset(self): ...
|
||||
|
||||
@@ -1 +1 @@
|
||||
def wildcard_match(pattern, text, case_insensitive: bool = ...): ...
|
||||
def wildcard_match(pattern, text, case_insensitive: bool = True): ...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
def get_stacktrace(limit: Incomplete | None = ...): ...
|
||||
def get_stacktrace(limit: Incomplete | None = None): ...
|
||||
|
||||
@@ -15,33 +15,33 @@ class Locale:
|
||||
script: str | None
|
||||
variant: str | None
|
||||
def __init__(
|
||||
self, language: str, territory: str | None = ..., script: str | None = ..., variant: str | None = ...
|
||||
self, language: str, territory: str | None = None, script: str | None = None, variant: str | None = None
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def default(cls, category: str | None = ..., aliases: Mapping[str, str] = ...) -> Locale: ...
|
||||
def default(cls, category: str | None = None, aliases: Mapping[str, str] = ...) -> Locale: ...
|
||||
@classmethod
|
||||
def negotiate(
|
||||
cls, preferred: Iterable[str], available: Iterable[str], sep: str = ..., aliases: Mapping[str, str] = ...
|
||||
cls, preferred: Iterable[str], available: Iterable[str], sep: str = "_", aliases: Mapping[str, str] = ...
|
||||
) -> Locale | None: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def parse(cls, identifier: None, sep: str = ..., resolve_likely_subtags: bool = ...) -> None: ...
|
||||
def parse(cls, identifier: None, sep: str = "_", resolve_likely_subtags: bool = True) -> None: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def parse(cls, identifier: str | Locale, sep: str = ..., resolve_likely_subtags: bool = ...) -> Locale: ...
|
||||
def parse(cls, identifier: str | Locale, sep: str = "_", resolve_likely_subtags: bool = True) -> Locale: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def get_display_name(self, locale: Locale | str | None = ...) -> str | None: ...
|
||||
def get_display_name(self, locale: Locale | str | None = None) -> str | None: ...
|
||||
@property
|
||||
def display_name(self) -> str | None: ...
|
||||
def get_language_name(self, locale: Locale | str | None = ...) -> str | None: ...
|
||||
def get_language_name(self, locale: Locale | str | None = None) -> str | None: ...
|
||||
@property
|
||||
def language_name(self) -> str | None: ...
|
||||
def get_territory_name(self, locale: Locale | str | None = ...) -> str | None: ...
|
||||
def get_territory_name(self, locale: Locale | str | None = None) -> str | None: ...
|
||||
@property
|
||||
def territory_name(self) -> str | None: ...
|
||||
def get_script_name(self, locale: Locale | str | None = ...) -> str | None: ...
|
||||
def get_script_name(self, locale: Locale | str | None = None) -> str | None: ...
|
||||
@property
|
||||
def script_name(self) -> str | None: ...
|
||||
@property
|
||||
@@ -123,12 +123,12 @@ class Locale:
|
||||
@property
|
||||
def unit_display_names(self) -> LocaleDataDict: ...
|
||||
|
||||
def default_locale(category: str | None = ..., aliases: Mapping[str, str] = ...) -> str | None: ...
|
||||
def default_locale(category: str | None = None, aliases: Mapping[str, str] = ...) -> str | None: ...
|
||||
def negotiate_locale(
|
||||
preferred: Iterable[str], available: Iterable[str], sep: str = ..., aliases: Mapping[str, str] = ...
|
||||
preferred: Iterable[str], available: Iterable[str], sep: str = "_", aliases: Mapping[str, str] = ...
|
||||
) -> str | None: ...
|
||||
def parse_locale(identifier: str, sep: str = ...) -> tuple[str, str | None, str | None, str | None]: ...
|
||||
def get_locale_identifier(tup: tuple[str, str | None, str | None, str | None], sep: str = ...) -> str: ...
|
||||
def parse_locale(identifier: str, sep: str = "_") -> tuple[str, str | None, str | None, str | None]: ...
|
||||
def get_locale_identifier(tup: tuple[str, str | None, str | None, str | None], sep: str = "_") -> str: ...
|
||||
def get_global(key: _GLOBAL_KEY) -> Mapping[str, Any]: ...
|
||||
|
||||
_GLOBAL_KEY: TypeAlias = Literal[
|
||||
|
||||
@@ -17,67 +17,71 @@ _PredefinedTimeFormat: TypeAlias = Literal["full", "long", "medium", "short"]
|
||||
_Context: TypeAlias = Literal["format", "stand-alone"]
|
||||
|
||||
def format_datetime(
|
||||
datetime: _Instant = ...,
|
||||
format: _PredefinedTimeFormat | str = ...,
|
||||
tzinfo: tzinfo | None = ...,
|
||||
datetime: _Instant = None,
|
||||
format: _PredefinedTimeFormat | str = "medium",
|
||||
tzinfo: tzinfo | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str: ...
|
||||
def format_date(date: date | None = ..., format: _PredefinedTimeFormat | str = ..., locale: Locale | str | None = ...) -> str: ...
|
||||
def format_date(
|
||||
date: date | None = None, format: _PredefinedTimeFormat | str = "medium", locale: Locale | str | None = ...
|
||||
) -> str: ...
|
||||
def format_time(
|
||||
time: time | datetime | float | None = ...,
|
||||
format: _PredefinedTimeFormat | str = ...,
|
||||
tzinfo: tzinfo | None = ...,
|
||||
time: time | datetime | float | None = None,
|
||||
format: _PredefinedTimeFormat | str = "medium",
|
||||
tzinfo: tzinfo | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str: ...
|
||||
def format_timedelta(
|
||||
delta: timedelta | int,
|
||||
granularity: Literal["year", "month", "week", "day", "hour", "minute", "second"] = ...,
|
||||
threshold: float = ...,
|
||||
add_direction: bool = ...,
|
||||
format: Literal["narrow", "short", "medium", "long"] = ...,
|
||||
granularity: Literal["year", "month", "week", "day", "hour", "minute", "second"] = "second",
|
||||
threshold: float = 0.85,
|
||||
add_direction: bool = False,
|
||||
format: Literal["narrow", "short", "medium", "long"] = "long",
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str: ...
|
||||
def format_skeleton(
|
||||
skeleton: str, datetime: _Instant = ..., tzinfo: tzinfo | None = ..., fuzzy: bool = ..., locale: Locale | str | None = ...
|
||||
skeleton: str, datetime: _Instant = None, tzinfo: tzinfo | None = None, fuzzy: bool = True, locale: Locale | str | None = ...
|
||||
) -> str: ...
|
||||
def format_interval(
|
||||
start: _Instant,
|
||||
end: _Instant,
|
||||
skeleton: str | None = ...,
|
||||
tzinfo: tzinfo | None = ...,
|
||||
fuzzy: bool = ...,
|
||||
skeleton: str | None = None,
|
||||
tzinfo: tzinfo | None = None,
|
||||
fuzzy: bool = True,
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str: ...
|
||||
|
||||
# Timezone Functionality
|
||||
@overload
|
||||
def get_timezone(zone: str | BaseTzInfo | None = ...) -> BaseTzInfo: ...
|
||||
def get_timezone(zone: str | BaseTzInfo | None = None) -> BaseTzInfo: ...
|
||||
@overload
|
||||
def get_timezone(zone: tzinfo) -> tzinfo: ...
|
||||
def get_timezone_gmt(
|
||||
datetime: _Instant = ...,
|
||||
width: Literal["long", "short", "iso8601", "iso8601_short"] = ...,
|
||||
datetime: _Instant = None,
|
||||
width: Literal["long", "short", "iso8601", "iso8601_short"] = "long",
|
||||
locale: Locale | str | None = ...,
|
||||
return_z: bool = ...,
|
||||
return_z: bool = False,
|
||||
) -> str: ...
|
||||
|
||||
_DtOrTzinfo: TypeAlias = datetime | tzinfo | str | int | time | None
|
||||
|
||||
def get_timezone_location(dt_or_tzinfo: _DtOrTzinfo = ..., locale: Locale | str | None = ..., return_city: bool = ...) -> str: ...
|
||||
def get_timezone_location(
|
||||
dt_or_tzinfo: _DtOrTzinfo = None, locale: Locale | str | None = ..., return_city: bool = False
|
||||
) -> str: ...
|
||||
def get_timezone_name(
|
||||
dt_or_tzinfo: _DtOrTzinfo = ...,
|
||||
width: Literal["long", "short"] = ...,
|
||||
uncommon: bool = ...,
|
||||
dt_or_tzinfo: _DtOrTzinfo = None,
|
||||
width: Literal["long", "short"] = "long",
|
||||
uncommon: bool = False,
|
||||
locale: Locale | str | None = ...,
|
||||
zone_variant: Literal["generic", "daylight", "standard"] | None = ...,
|
||||
return_zone: bool = ...,
|
||||
zone_variant: Literal["generic", "daylight", "standard"] | None = None,
|
||||
return_zone: bool = False,
|
||||
) -> str: ...
|
||||
|
||||
# Note: While Babel accepts any tzinfo for the most part, the get_next_timeout_transition()
|
||||
# function requires a tzinfo that is produced by get_timezone()/pytz AND has DST info.
|
||||
# The typing here will help you with the first requirement, but will not protect against
|
||||
# pytz tzinfo's without DST info, like what you get from get_timezone("UTC") for instance.
|
||||
def get_next_timezone_transition(zone: BaseTzInfo | None = ..., dt: _Instant = ...) -> TimezoneTransition: ...
|
||||
def get_next_timezone_transition(zone: BaseTzInfo | None = None, dt: _Instant = None) -> TimezoneTransition: ...
|
||||
|
||||
class TimezoneTransition:
|
||||
# This class itself is not included in the documentation, yet it is mentioned by name.
|
||||
@@ -87,7 +91,7 @@ class TimezoneTransition:
|
||||
to_tzinfo: tzinfo
|
||||
reference_date: datetime | None
|
||||
def __init__(
|
||||
self, activates: datetime, from_tzinfo: tzinfo, to_tzinfo: tzinfo, reference_date: datetime | None = ...
|
||||
self, activates: datetime, from_tzinfo: tzinfo, to_tzinfo: tzinfo, reference_date: datetime | None = None
|
||||
) -> None: ...
|
||||
@property
|
||||
def from_tz(self) -> str: ...
|
||||
@@ -100,27 +104,31 @@ class TimezoneTransition:
|
||||
|
||||
# Data Access
|
||||
def get_period_names(
|
||||
width: Literal["abbreviated", "narrow", "wide"] = ..., context: _Context = ..., locale: Locale | str | None = ...
|
||||
width: Literal["abbreviated", "narrow", "wide"] = "wide", context: _Context = "stand-alone", locale: Locale | str | None = ...
|
||||
) -> LocaleDataDict: ...
|
||||
def get_day_names(
|
||||
width: Literal["abbreviated", "narrow", "short", "wide"] = ..., context: _Context = ..., locale: Locale | str | None = ...
|
||||
width: Literal["abbreviated", "narrow", "short", "wide"] = "wide",
|
||||
context: _Context = "format",
|
||||
locale: Locale | str | None = ...,
|
||||
) -> LocaleDataDict: ...
|
||||
def get_month_names(
|
||||
width: Literal["abbreviated", "narrow", "wide"] = ..., context: _Context = ..., locale: Locale | str | None = ...
|
||||
width: Literal["abbreviated", "narrow", "wide"] = "wide", context: _Context = "format", locale: Locale | str | None = ...
|
||||
) -> LocaleDataDict: ...
|
||||
def get_quarter_names(
|
||||
width: Literal["abbreviated", "narrow", "wide"] = ..., context: _Context = ..., locale: Locale | str | None = ...
|
||||
width: Literal["abbreviated", "narrow", "wide"] = "wide", context: _Context = "format", locale: Locale | str | None = ...
|
||||
) -> LocaleDataDict: ...
|
||||
def get_era_names(width: Literal["abbreviated", "narrow", "wide"] = ..., locale: Locale | str | None = ...) -> LocaleDataDict: ...
|
||||
def get_date_format(format: _PredefinedTimeFormat = ..., locale: Locale | str | None = ...) -> DateTimePattern: ...
|
||||
def get_datetime_format(format: _PredefinedTimeFormat = ..., locale: Locale | str | None = ...) -> DateTimePattern: ...
|
||||
def get_time_format(format: _PredefinedTimeFormat = ..., locale: Locale | str | None = ...) -> DateTimePattern: ...
|
||||
def get_era_names(
|
||||
width: Literal["abbreviated", "narrow", "wide"] = "wide", locale: Locale | str | None = ...
|
||||
) -> LocaleDataDict: ...
|
||||
def get_date_format(format: _PredefinedTimeFormat = "medium", locale: Locale | str | None = ...) -> DateTimePattern: ...
|
||||
def get_datetime_format(format: _PredefinedTimeFormat = "medium", locale: Locale | str | None = ...) -> DateTimePattern: ...
|
||||
def get_time_format(format: _PredefinedTimeFormat = "medium", locale: Locale | str | None = ...) -> DateTimePattern: ...
|
||||
|
||||
class ParseError(ValueError): ...
|
||||
|
||||
# Basic Parsing
|
||||
def parse_date(string: str, locale: Locale | str | None = ..., format: _PredefinedTimeFormat = ...) -> date: ...
|
||||
def parse_time(string: str, locale: Locale | str | None = ..., format: _PredefinedTimeFormat = ...) -> time: ...
|
||||
def parse_date(string: str, locale: Locale | str | None = ..., format: _PredefinedTimeFormat = "medium") -> date: ...
|
||||
def parse_time(string: str, locale: Locale | str | None = ..., format: _PredefinedTimeFormat = "medium") -> time: ...
|
||||
def parse_pattern(pattern: str) -> DateTimePattern: ...
|
||||
|
||||
# Undocumented
|
||||
@@ -133,7 +141,7 @@ time_ = time
|
||||
TIMEDELTA_UNITS: tuple[tuple[str, int], ...]
|
||||
|
||||
def get_period_id(
|
||||
time: _Instant, tzinfo: BaseTzInfo | None = ..., type: Literal["selection"] | None = ..., locale: Locale | str | None = ...
|
||||
time: _Instant, tzinfo: BaseTzInfo | None = None, type: Literal["selection"] | None = None, locale: Locale | str | None = ...
|
||||
): ...
|
||||
|
||||
class DateTimePattern:
|
||||
@@ -154,7 +162,7 @@ class DateTimeFormat:
|
||||
def format_quarter(self, char: str, num: int) -> str: ...
|
||||
def format_month(self, char: str, num: int) -> str: ...
|
||||
def format_week(self, char: str, num: int) -> str: ...
|
||||
def format_weekday(self, char: str = ..., num: int = ...) -> str: ...
|
||||
def format_weekday(self, char: str = "E", num: int = 4) -> str: ...
|
||||
def format_day_of_year(self, num: int) -> str: ...
|
||||
def format_day_of_week_in_month(self) -> str: ...
|
||||
def format_period(self, char: str, num: int) -> str: ...
|
||||
@@ -162,8 +170,8 @@ class DateTimeFormat:
|
||||
def format_milliseconds_in_day(self, num: int) -> str: ...
|
||||
def format_timezone(self, char: str, num: int) -> str: ...
|
||||
def format(self, value: SupportsInt, length: int) -> str: ...
|
||||
def get_day_of_year(self, date: date | None = ...) -> int: ...
|
||||
def get_week_number(self, day_of_period: int, day_of_week: int | None = ...) -> int: ...
|
||||
def get_day_of_year(self, date: date | None = None) -> int: ...
|
||||
def get_week_number(self, day_of_period: int, day_of_week: int | None = None) -> int: ...
|
||||
|
||||
PATTERN_CHARS: dict[str, list[int] | None]
|
||||
PATTERN_CHAR_ORDER: str
|
||||
@@ -171,4 +179,4 @@ PATTERN_CHAR_ORDER: str
|
||||
def tokenize_pattern(pattern: str) -> list[tuple[str, str | tuple[str, int]]]: ...
|
||||
def untokenize_pattern(tokens: Iterable[tuple[str, str | tuple[str, int]]]) -> str: ...
|
||||
def split_interval_pattern(pattern: str) -> list[str]: ...
|
||||
def match_skeleton(skeleton: str, options: Iterable[str], allow_different_fields: bool = ...) -> str | None: ...
|
||||
def match_skeleton(skeleton: str, options: Iterable[str], allow_different_fields: bool = False) -> str | None: ...
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
def get_official_languages(territory: str, regional: bool = ..., de_facto: bool = ...) -> tuple[str, ...]: ...
|
||||
def get_official_languages(territory: str, regional: bool = False, de_facto: bool = False) -> tuple[str, ...]: ...
|
||||
def get_territory_language_info(territory: str) -> dict[str, dict[str, float | str | None]]: ...
|
||||
|
||||
@@ -7,6 +7,6 @@ DEFAULT_LOCALE: str | None
|
||||
|
||||
def format_list(
|
||||
lst: Iterable[str],
|
||||
style: Literal["standard", "standard-short", "or", "or-short", "unit", "unit-short", "unit-narrow"] = ...,
|
||||
style: Literal["standard", "standard-short", "or", "or-short", "unit", "unit-short", "unit-narrow"] = "standard",
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str: ...
|
||||
|
||||
@@ -6,7 +6,7 @@ def normalize_locale(name: str) -> str | None: ...
|
||||
def resolve_locale_filename(name: PathLike[str] | str) -> str: ...
|
||||
def exists(name: str) -> bool: ...
|
||||
def locale_identifiers() -> list[str]: ...
|
||||
def load(name: PathLike[str] | str, merge_inherited: bool = ...) -> dict[str, Any]: ...
|
||||
def load(name: PathLike[str] | str, merge_inherited: bool = True) -> dict[str, Any]: ...
|
||||
def merge(dict1: MutableMapping[Any, Any], dict2: Mapping[Any, Any]) -> None: ...
|
||||
|
||||
class Alias:
|
||||
@@ -16,7 +16,7 @@ class Alias:
|
||||
|
||||
class LocaleDataDict(MutableMapping[Any, Any]):
|
||||
base: Mapping[str, Any]
|
||||
def __init__(self, data: Mapping[str | int | None, Any], base: Mapping[str | int | None, Any] | None = ...) -> None: ...
|
||||
def __init__(self, data: Mapping[str | int | None, Any], base: Mapping[str | int | None, Any] | None = None) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[str | int | None]: ...
|
||||
def __getitem__(self, key: str | int | None) -> Any: ...
|
||||
|
||||
@@ -22,14 +22,14 @@ class Message:
|
||||
def __init__(
|
||||
self,
|
||||
id: str,
|
||||
string: str = ...,
|
||||
locations: Iterable[tuple[str, int]] = ...,
|
||||
flags: Iterable[str] = ...,
|
||||
auto_comments: Iterable[str] = ...,
|
||||
user_comments: Iterable[str] = ...,
|
||||
previous_id: _MessageID = ...,
|
||||
lineno: int | None = ...,
|
||||
context: str | None = ...,
|
||||
string: str = "",
|
||||
locations: Iterable[tuple[str, int]] = (),
|
||||
flags: Iterable[str] = (),
|
||||
auto_comments: Iterable[str] = (),
|
||||
user_comments: Iterable[str] = (),
|
||||
previous_id: _MessageID = (),
|
||||
lineno: int | None = None,
|
||||
context: str | None = None,
|
||||
) -> None: ...
|
||||
def __cmp__(self, other: Message) -> int: ...
|
||||
def __gt__(self, other: Message) -> bool: ...
|
||||
@@ -40,7 +40,7 @@ class Message:
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def is_identical(self, other: Message) -> bool: ...
|
||||
def clone(self) -> Message: ...
|
||||
def check(self, catalog: Catalog | None = ...) -> list[TranslationError]: ...
|
||||
def check(self, catalog: Catalog | None = None) -> list[TranslationError]: ...
|
||||
@property
|
||||
def fuzzy(self) -> bool: ...
|
||||
@property
|
||||
@@ -65,19 +65,19 @@ class Catalog:
|
||||
obsolete: OrderedDict[str | tuple[str, str], Message]
|
||||
def __init__(
|
||||
self,
|
||||
locale: str | Locale | None = ...,
|
||||
domain: str | None = ...,
|
||||
locale: str | Locale | None = None,
|
||||
domain: str | None = None,
|
||||
header_comment: str | None = ...,
|
||||
project: str | None = ...,
|
||||
version: str | None = ...,
|
||||
copyright_holder: str | None = ...,
|
||||
msgid_bugs_address: str | None = ...,
|
||||
creation_date: datetime.datetime | str | None = ...,
|
||||
revision_date: datetime.datetime | datetime.time | float | str | None = ...,
|
||||
last_translator: str | None = ...,
|
||||
language_team: str | None = ...,
|
||||
charset: str | None = ...,
|
||||
fuzzy: bool = ...,
|
||||
project: str | None = None,
|
||||
version: str | None = None,
|
||||
copyright_holder: str | None = None,
|
||||
msgid_bugs_address: str | None = None,
|
||||
creation_date: datetime.datetime | str | None = None,
|
||||
revision_date: datetime.datetime | datetime.time | float | str | None = None,
|
||||
last_translator: str | None = None,
|
||||
language_team: str | None = None,
|
||||
charset: str | None = None,
|
||||
fuzzy: bool = True,
|
||||
) -> None: ...
|
||||
@property
|
||||
def locale(self) -> Locale | None: ...
|
||||
@@ -108,19 +108,23 @@ class Catalog:
|
||||
def add(
|
||||
self,
|
||||
id: _MessageID,
|
||||
string: _MessageID | None = ...,
|
||||
locations: Iterable[tuple[str, int]] = ...,
|
||||
flags: Iterable[str] = ...,
|
||||
auto_comments: Iterable[str] = ...,
|
||||
user_comments: Iterable[str] = ...,
|
||||
previous_id: _MessageID = ...,
|
||||
lineno: int | None = ...,
|
||||
context: str | None = ...,
|
||||
string: _MessageID | None = None,
|
||||
locations: Iterable[tuple[str, int]] = (),
|
||||
flags: Iterable[str] = (),
|
||||
auto_comments: Iterable[str] = (),
|
||||
user_comments: Iterable[str] = (),
|
||||
previous_id: _MessageID = (),
|
||||
lineno: int | None = None,
|
||||
context: str | None = None,
|
||||
) -> Message: ...
|
||||
def check(self) -> Generator[tuple[Message, list[TranslationError]], None, None]: ...
|
||||
def get(self, id: _MessageID, context: str | None = ...): ...
|
||||
def delete(self, id, context: str | None = ...) -> None: ...
|
||||
def get(self, id: _MessageID, context: str | None = None): ...
|
||||
def delete(self, id, context: str | None = None) -> None: ...
|
||||
def update(
|
||||
self, template: Catalog, no_fuzzy_matching: bool = ..., update_header_comment: bool = ..., keep_user_comments: bool = ...
|
||||
self,
|
||||
template: Catalog,
|
||||
no_fuzzy_matching: bool = False,
|
||||
update_header_comment: bool = False,
|
||||
keep_user_comments: bool = True,
|
||||
) -> None: ...
|
||||
def is_identical(self, other: Catalog) -> bool: ...
|
||||
|
||||
@@ -15,23 +15,23 @@ empty_msgid_warning: str
|
||||
def extract_from_dir(
|
||||
dirname: AnyStr | PathLike[AnyStr],
|
||||
method_map: Iterable[tuple[str, str]] = ...,
|
||||
options_map: SupportsItems[str, dict[str, Any]] | None = ...,
|
||||
options_map: SupportsItems[str, dict[str, Any]] | None = None,
|
||||
keywords: Mapping[str, _Keyword] = ...,
|
||||
comment_tags: Collection[str] = ...,
|
||||
callback: Callable[[AnyStr, str, dict[str, Any]], object] | None = ...,
|
||||
strip_comment_tags: bool = ...,
|
||||
directory_filter: Callable[[str], bool] | None = ...,
|
||||
comment_tags: Collection[str] = (),
|
||||
callback: Callable[[AnyStr, str, dict[str, Any]], object] | None = None,
|
||||
strip_comment_tags: bool = False,
|
||||
directory_filter: Callable[[str], bool] | None = None,
|
||||
) -> Generator[tuple[AnyStr, int, str | tuple[str, ...], list[str], str | None], None, None]: ...
|
||||
@overload
|
||||
def extract_from_dir(
|
||||
dirname: None = ..., # No dirname causes os.getcwd() to be used, producing str.
|
||||
dirname: None = None, # No dirname causes os.getcwd() to be used, producing str.
|
||||
method_map: Iterable[tuple[str, str]] = ...,
|
||||
options_map: SupportsItems[str, dict[str, Any]] | None = ...,
|
||||
options_map: SupportsItems[str, dict[str, Any]] | None = None,
|
||||
keywords: Mapping[str, _Keyword] = ...,
|
||||
comment_tags: Collection[str] = ...,
|
||||
callback: Callable[[str, str, dict[str, Any]], object] | None = ...,
|
||||
strip_comment_tags: bool = ...,
|
||||
directory_filter: Callable[[str], bool] | None = ...,
|
||||
comment_tags: Collection[str] = (),
|
||||
callback: Callable[[str, str, dict[str, Any]], object] | None = None,
|
||||
strip_comment_tags: bool = False,
|
||||
directory_filter: Callable[[str], bool] | None = None,
|
||||
) -> Generator[tuple[str, int, str | tuple[str, ...], list[str], str | None], None, None]: ...
|
||||
def check_and_call_extract_file(
|
||||
filepath: AnyStr | PathLike[AnyStr],
|
||||
@@ -41,15 +41,15 @@ def check_and_call_extract_file(
|
||||
keywords: Mapping[str, _Keyword],
|
||||
comment_tags: Collection[str],
|
||||
strip_comment_tags,
|
||||
dirpath: Incomplete | None = ...,
|
||||
dirpath: Incomplete | None = None,
|
||||
) -> Generator[tuple[AnyStr, int, str | tuple[str, ...], list[str], str | None], None, None]: ...
|
||||
def extract_from_file(
|
||||
method,
|
||||
filename: AnyStr | PathLike[AnyStr],
|
||||
keywords: Mapping[str, _Keyword] = ...,
|
||||
comment_tags: Collection[str] = ...,
|
||||
options: dict[str, Any] | None = ...,
|
||||
strip_comment_tags: bool = ...,
|
||||
comment_tags: Collection[str] = (),
|
||||
options: dict[str, Any] | None = None,
|
||||
strip_comment_tags: bool = False,
|
||||
) -> list[tuple[AnyStr, int, str | tuple[str, ...], list[str], str | None]]: ...
|
||||
|
||||
class _FileObj(SupportsRead[bytes], SupportsReadline[bytes], Protocol):
|
||||
@@ -60,9 +60,9 @@ def extract(
|
||||
method,
|
||||
fileobj: _FileObj,
|
||||
keywords: Mapping[str, _Keyword] = ...,
|
||||
comment_tags: Collection[str] = ...,
|
||||
options: dict[str, Any] | None = ...,
|
||||
strip_comment_tags: bool = ...,
|
||||
comment_tags: Collection[str] = (),
|
||||
options: dict[str, Any] | None = None,
|
||||
strip_comment_tags: bool = False,
|
||||
) -> Iterable[tuple[int, str | tuple[str, ...], list[str], str | None]]: ...
|
||||
def extract_nothing(
|
||||
fileobj: _FileObj, keywords: Mapping[str, _Keyword], comment_tags: Collection[str], options: dict[str, Any]
|
||||
|
||||
@@ -3,7 +3,7 @@ from _typeshed import Incomplete
|
||||
from distutils.cmd import Command as _Command
|
||||
from typing import Any
|
||||
|
||||
def listify_value(arg, split: Incomplete | None = ...): ...
|
||||
def listify_value(arg, split: Incomplete | None = None): ...
|
||||
|
||||
class Command(_Command, metaclass=abc.ABCMeta):
|
||||
as_args: Any
|
||||
@@ -17,7 +17,7 @@ class Command(_Command, metaclass=abc.ABCMeta):
|
||||
force: Any
|
||||
help: int
|
||||
finalized: int
|
||||
def __init__(self, dist: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, dist: Incomplete | None = None) -> None: ...
|
||||
|
||||
class compile_catalog(Command):
|
||||
description: str
|
||||
@@ -112,8 +112,8 @@ class CommandLineInterface:
|
||||
command_classes: Any
|
||||
log: Any
|
||||
parser: Any
|
||||
def run(self, argv: Incomplete | None = ...): ...
|
||||
def run(self, argv: Incomplete | None = None): ...
|
||||
|
||||
def main(): ...
|
||||
def parse_mapping(fileobj, filename: Incomplete | None = ...): ...
|
||||
def parse_keywords(strings=...): ...
|
||||
def parse_mapping(fileobj, filename: Incomplete | None = None): ...
|
||||
def parse_keywords(strings=[]): ...
|
||||
|
||||
@@ -21,4 +21,6 @@ class Token(NamedTuple):
|
||||
def get_rules(jsx: bool, dotted: bool, template_string: bool) -> list[tuple[str | None, Pattern[str]]]: ... # undocumented
|
||||
def indicates_division(token: Token) -> bool: ...
|
||||
def unquote_string(string: str) -> str: ...
|
||||
def tokenize(source: str, jsx: bool = ..., dotted: bool = ..., template_string: bool = ...) -> Generator[Token, None, None]: ...
|
||||
def tokenize(
|
||||
source: str, jsx: bool = True, dotted: bool = True, template_string: bool = True
|
||||
) -> Generator[Token, None, None]: ...
|
||||
|
||||
@@ -6,4 +6,4 @@ LE_MAGIC: int
|
||||
BE_MAGIC: int
|
||||
|
||||
def read_mo(fileobj: SupportsRead[bytes]) -> Catalog: ...
|
||||
def write_mo(fileobj: SupportsWrite[bytes], catalog: Catalog, use_fuzzy: bool = ...) -> None: ...
|
||||
def write_mo(fileobj: SupportsWrite[bytes], catalog: Catalog, use_fuzzy: bool = False) -> None: ...
|
||||
|
||||
@@ -10,4 +10,4 @@ class _PluralTuple(tuple[int, str]):
|
||||
@property
|
||||
def plural_forms(self) -> str: ...
|
||||
|
||||
def get_plural(locale: str = ...) -> _PluralTuple: ...
|
||||
def get_plural(locale: str | None = ...) -> _PluralTuple: ...
|
||||
|
||||
@@ -46,31 +46,31 @@ class PoFileParser:
|
||||
in_msgid: bool
|
||||
in_msgstr: bool
|
||||
in_msgctxt: bool
|
||||
def __init__(self, catalog, ignore_obsolete: bool = ..., abort_invalid: bool = ...) -> None: ...
|
||||
def __init__(self, catalog, ignore_obsolete: bool = False, abort_invalid: bool = False) -> None: ...
|
||||
def parse(self, fileobj: Iterable[str | bytes]) -> None: ...
|
||||
|
||||
def read_po(
|
||||
fileobj: Iterable[str | bytes],
|
||||
locale: str | Locale | None = ...,
|
||||
domain: str | None = ...,
|
||||
ignore_obsolete: bool = ...,
|
||||
charset: str | None = ...,
|
||||
abort_invalid: bool = ...,
|
||||
locale: str | Locale | None = None,
|
||||
domain: str | None = None,
|
||||
ignore_obsolete: bool = False,
|
||||
charset: str | None = None,
|
||||
abort_invalid: bool = False,
|
||||
) -> Catalog: ...
|
||||
|
||||
WORD_SEP: Pattern[str]
|
||||
|
||||
def escape(string: str) -> str: ...
|
||||
def normalize(string: str, prefix: str = ..., width: int = ...) -> str: ...
|
||||
def normalize(string: str, prefix: str = "", width: int = 76) -> str: ...
|
||||
def write_po(
|
||||
fileobj: SupportsWrite[bytes],
|
||||
catalog: Catalog,
|
||||
width: int | None = ...,
|
||||
no_location: bool = ...,
|
||||
omit_header: bool = ...,
|
||||
sort_output: bool = ...,
|
||||
sort_by_file: bool = ...,
|
||||
ignore_obsolete: bool = ...,
|
||||
include_previous: bool = ...,
|
||||
include_lineno: bool = ...,
|
||||
width: int | None = 76,
|
||||
no_location: bool = False,
|
||||
omit_header: bool = False,
|
||||
sort_output: bool = False,
|
||||
sort_by_file: bool = False,
|
||||
ignore_obsolete: bool = False,
|
||||
include_previous: bool = False,
|
||||
include_lineno: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
@@ -16,17 +16,17 @@ def list_currencies(locale: Locale | str | None = ...) -> set[str]: ...
|
||||
def validate_currency(currency: str, locale: Locale | str | None = ...) -> None: ...
|
||||
def is_currency(currency: str, locale: Locale | str | None = ...) -> bool: ...
|
||||
def normalize_currency(currency: str, locale: Locale | str | None = ...) -> str | None: ...
|
||||
def get_currency_name(currency: str, count: float | decimal.Decimal | None = ..., locale: Locale | str | None = ...) -> str: ...
|
||||
def get_currency_name(currency: str, count: float | decimal.Decimal | None = None, locale: Locale | str | None = ...) -> str: ...
|
||||
def get_currency_symbol(currency: str, locale: Locale | str | None = ...) -> str: ...
|
||||
def get_currency_precision(currency: str) -> int: ...
|
||||
def get_currency_unit_pattern(currency: str, count: float | None = ..., locale: Locale | str | None = ...) -> str: ...
|
||||
def get_currency_unit_pattern(currency: str, count: float | None = None, locale: Locale | str | None = ...) -> str: ...
|
||||
def get_territory_currencies(
|
||||
territory: str,
|
||||
start_date: date | None = ...,
|
||||
end_date: date | None = ...,
|
||||
tender: bool = ...,
|
||||
non_tender: bool = ...,
|
||||
include_details: bool = ...,
|
||||
start_date: date | None = None,
|
||||
end_date: date | None = None,
|
||||
tender: bool = True,
|
||||
non_tender: bool = False,
|
||||
include_details: bool = False,
|
||||
) -> list[str]: ...
|
||||
def get_decimal_symbol(locale: Locale | str | None = ...) -> str: ...
|
||||
def get_plus_sign_symbol(locale: Locale | str | None = ...) -> str: ...
|
||||
@@ -38,13 +38,13 @@ def get_decimal_precision(number: decimal.Decimal) -> int: ...
|
||||
def get_decimal_quantum(precision: int | decimal.Decimal) -> decimal.Decimal: ...
|
||||
def format_decimal(
|
||||
number: float | decimal.Decimal | str,
|
||||
format: str | None = ...,
|
||||
format: str | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
decimal_quantization: bool = ...,
|
||||
group_separator: bool = ...,
|
||||
decimal_quantization: bool = True,
|
||||
group_separator: bool = True,
|
||||
): ...
|
||||
def format_compact_decimal(
|
||||
number: float, *, format_type: Literal["short", "long"] = ..., locale: Locale | str | None = ..., fraction_digits: int = ...
|
||||
number: float, *, format_type: Literal["short", "long"] = "short", locale: Locale | str | None = ..., fraction_digits: int = 0
|
||||
) -> str: ...
|
||||
|
||||
class UnknownCurrencyFormatError(KeyError): ...
|
||||
@@ -52,33 +52,33 @@ class UnknownCurrencyFormatError(KeyError): ...
|
||||
def format_currency(
|
||||
number: float | decimal.Decimal | str,
|
||||
currency: str,
|
||||
format: str | None = ...,
|
||||
format: str | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
currency_digits: bool = ...,
|
||||
format_type: Literal["name", "standard", "accounting"] = ...,
|
||||
decimal_quantization: bool = ...,
|
||||
group_separator: bool = ...,
|
||||
currency_digits: bool = True,
|
||||
format_type: Literal["name", "standard", "accounting"] = "standard",
|
||||
decimal_quantization: bool = True,
|
||||
group_separator: bool = True,
|
||||
) -> str: ...
|
||||
def format_percent(
|
||||
number: float | decimal.Decimal | str,
|
||||
format: str | None = ...,
|
||||
format: str | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
decimal_quantization: bool = ...,
|
||||
group_separator: bool = ...,
|
||||
decimal_quantization: bool = True,
|
||||
group_separator: bool = True,
|
||||
) -> str: ...
|
||||
def format_scientific(
|
||||
number: float | decimal.Decimal | str,
|
||||
format: str | None = ...,
|
||||
format: str | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
decimal_quantization: bool = ...,
|
||||
decimal_quantization: bool = True,
|
||||
) -> str: ...
|
||||
|
||||
class NumberFormatError(ValueError):
|
||||
suggestions: str | None
|
||||
def __init__(self, message: str, suggestions: str | None = ...) -> None: ...
|
||||
def __init__(self, message: str, suggestions: str | None = None) -> None: ...
|
||||
|
||||
def parse_number(string: str, locale: Locale | str | None = ...) -> int: ...
|
||||
def parse_decimal(string: str, locale: Locale | str | None = ..., strict: bool = ...) -> decimal.Decimal: ...
|
||||
def parse_decimal(string: str, locale: Locale | str | None = ..., strict: bool = False) -> decimal.Decimal: ...
|
||||
|
||||
PREFIX_END: str
|
||||
NUMBER_TOKEN: str
|
||||
@@ -119,9 +119,9 @@ class NumberPattern:
|
||||
self,
|
||||
value: float | decimal.Decimal,
|
||||
locale: Locale | str | None,
|
||||
currency: str | None = ...,
|
||||
currency_digits: bool = ...,
|
||||
decimal_quantization: bool = ...,
|
||||
force_frac: int | None = ...,
|
||||
group_separator: bool = ...,
|
||||
currency: str | None = None,
|
||||
currency_digits: bool = True,
|
||||
decimal_quantization: bool = True,
|
||||
force_frac: int | None = None,
|
||||
group_separator: bool = True,
|
||||
) -> str: ...
|
||||
|
||||
@@ -26,8 +26,8 @@ def cldr_modulo(a, b): ...
|
||||
class RuleError(Exception): ...
|
||||
|
||||
def tokenize_rule(s): ...
|
||||
def test_next_token(tokens, type_, value: Incomplete | None = ...): ...
|
||||
def skip_token(tokens, type_, value: Incomplete | None = ...): ...
|
||||
def test_next_token(tokens, type_, value: Incomplete | None = None): ...
|
||||
def skip_token(tokens, type_, value: Incomplete | None = None): ...
|
||||
def value_node(value): ...
|
||||
def ident_node(name): ...
|
||||
def range_list_node(range_list): ...
|
||||
@@ -37,7 +37,7 @@ class _Parser:
|
||||
tokens: Any
|
||||
ast: Any
|
||||
def __init__(self, string) -> None: ...
|
||||
def expect(self, type_, value: Incomplete | None = ..., term: Incomplete | None = ...): ...
|
||||
def expect(self, type_, value: Incomplete | None = None, term: Incomplete | None = None): ...
|
||||
def condition(self): ...
|
||||
def and_condition(self): ...
|
||||
def relation(self): ...
|
||||
@@ -96,4 +96,4 @@ class _UnicodeCompiler(_Compiler):
|
||||
compile_or: Any
|
||||
compile_mod: Any
|
||||
def compile_not(self, relation): ...
|
||||
def compile_relation(self, method, expr, range_list, negated: bool = ...): ...
|
||||
def compile_relation(self, method, expr, range_list, negated: bool = False): ...
|
||||
|
||||
@@ -13,22 +13,22 @@ from .dates import _PredefinedTimeFormat
|
||||
class Format:
|
||||
locale: Locale
|
||||
tzinfo: BaseTzInfo | None
|
||||
def __init__(self, locale: Locale | str, tzinfo: BaseTzInfo | None = ...) -> None: ...
|
||||
def date(self, date: _date | None = ..., format: _PredefinedTimeFormat | str = ...) -> str: ...
|
||||
def datetime(self, datetime: _date | None = ..., format: _PredefinedTimeFormat | str = ...) -> str: ...
|
||||
def time(self, time: _time | _datetime | None = ..., format: _PredefinedTimeFormat | str = ...) -> str: ...
|
||||
def __init__(self, locale: Locale | str, tzinfo: BaseTzInfo | None = None) -> None: ...
|
||||
def date(self, date: _date | None = None, format: _PredefinedTimeFormat | str = "medium") -> str: ...
|
||||
def datetime(self, datetime: _date | None = None, format: _PredefinedTimeFormat | str = "medium") -> str: ...
|
||||
def time(self, time: _time | _datetime | None = None, format: _PredefinedTimeFormat | str = "medium") -> str: ...
|
||||
def timedelta(
|
||||
self,
|
||||
delta: _timedelta | int,
|
||||
granularity: Literal["year", "month", "week", "day", "hour", "minute", "second"] = ...,
|
||||
threshold: float = ...,
|
||||
format: _PredefinedTimeFormat = ...,
|
||||
add_direction: bool = ...,
|
||||
granularity: Literal["year", "month", "week", "day", "hour", "minute", "second"] = "second",
|
||||
threshold: float = 0.85,
|
||||
format: _PredefinedTimeFormat = "long",
|
||||
add_direction: bool = False,
|
||||
) -> str: ...
|
||||
def number(self, number: float | Decimal | str) -> str: ...
|
||||
def decimal(self, number: float | Decimal | str, format: str | None = ...) -> str: ...
|
||||
def decimal(self, number: float | Decimal | str, format: str | None = None) -> str: ...
|
||||
def currency(self, number: float | Decimal | str, currency: str) -> str: ...
|
||||
def percent(self, number: float | Decimal | str, format: str | None = ...) -> str: ...
|
||||
def percent(self, number: float | Decimal | str, format: str | None = None) -> str: ...
|
||||
def scientific(self, number: float | Decimal | str) -> str: ...
|
||||
|
||||
class LazyProxy:
|
||||
@@ -67,7 +67,7 @@ class NullTranslations(gettext.NullTranslations):
|
||||
plural: Any
|
||||
files: Any
|
||||
domain: Any
|
||||
def __init__(self, fp: Incomplete | None = ...): ...
|
||||
def __init__(self, fp: Incomplete | None = None): ...
|
||||
def dgettext(self, domain, message): ...
|
||||
def ldgettext(self, domain, message): ...
|
||||
def udgettext(self, domain, message): ...
|
||||
@@ -97,10 +97,10 @@ class NullTranslations(gettext.NullTranslations):
|
||||
class Translations(NullTranslations, gettext.GNUTranslations):
|
||||
DEFAULT_DOMAIN: str
|
||||
domain: Any
|
||||
def __init__(self, fp: Incomplete | None = ..., domain: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, fp: Incomplete | None = None, domain: Incomplete | None = None) -> None: ...
|
||||
ugettext: Any
|
||||
ungettext: Any
|
||||
@classmethod
|
||||
def load(cls, dirname: Incomplete | None = ..., locales: Incomplete | None = ..., domain: Incomplete | None = ...): ...
|
||||
def add(self, translations, merge: bool = ...): ...
|
||||
def load(cls, dirname: Incomplete | None = None, locales: Incomplete | None = None, domain: Incomplete | None = None): ...
|
||||
def add(self, translations, merge: bool = True): ...
|
||||
def merge(self, translations): ...
|
||||
|
||||
@@ -7,21 +7,21 @@ class UnknownUnitError(ValueError):
|
||||
def __init__(self, unit: str, locale: Locale) -> None: ...
|
||||
|
||||
def get_unit_name(
|
||||
measurement_unit: str, length: Literal["short", "long", "narrow"] = ..., locale: Locale | str | None = ...
|
||||
measurement_unit: str, length: Literal["short", "long", "narrow"] = "long", locale: Locale | str | None = ...
|
||||
) -> str: ...
|
||||
def format_unit(
|
||||
value: float | decimal.Decimal,
|
||||
measurement_unit: str,
|
||||
length: Literal["short", "long", "narrow"] = ...,
|
||||
format: str | None = ...,
|
||||
length: Literal["short", "long", "narrow"] = "long",
|
||||
format: str | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str: ...
|
||||
def format_compound_unit(
|
||||
numerator_value: float | decimal.Decimal,
|
||||
numerator_unit: str | None = ...,
|
||||
denominator_value: float | decimal.Decimal = ...,
|
||||
denominator_unit: str | None = ...,
|
||||
length: Literal["short", "long", "narrow"] = ...,
|
||||
format: str | None = ...,
|
||||
numerator_unit: str | None = None,
|
||||
denominator_value: float | decimal.Decimal = 1,
|
||||
denominator_unit: str | None = None,
|
||||
length: Literal["short", "long", "narrow"] = "long",
|
||||
format: str | None = None,
|
||||
locale: Locale | str | None = ...,
|
||||
) -> str | None: ...
|
||||
|
||||
@@ -20,19 +20,19 @@ def parse_encoding(fp: IO[bytes]) -> str | None: ...
|
||||
|
||||
PYTHON_FUTURE_IMPORT_re: Pattern[str]
|
||||
|
||||
def parse_future_flags(fp: IO[bytes], encoding: str = ...) -> int: ...
|
||||
def parse_future_flags(fp: IO[bytes], encoding: str = "latin-1") -> int: ...
|
||||
def pathmatch(pattern: str, filename: str) -> bool: ...
|
||||
|
||||
class TextWrapper(textwrap.TextWrapper):
|
||||
wordsep_re: Pattern[str]
|
||||
|
||||
def wraptext(text, width: int = ..., initial_indent: str = ..., subsequent_indent: str = ...): ...
|
||||
def wraptext(text, width: int = 70, initial_indent: str = "", subsequent_indent: str = ""): ...
|
||||
|
||||
odict = collections.OrderedDict
|
||||
|
||||
class FixedOffsetTimezone(tzinfo):
|
||||
zone: str
|
||||
def __init__(self, offset: float, name: str | None = ...) -> None: ...
|
||||
def __init__(self, offset: float, name: str | None = None) -> None: ...
|
||||
def utcoffset(self, dt: Any) -> timedelta: ...
|
||||
def tzname(self, dt: Any) -> str: ...
|
||||
def dst(self, dt: Any) -> timedelta: ...
|
||||
|
||||
@@ -37,13 +37,13 @@ class BeautifulSoup(Tag):
|
||||
markup: str
|
||||
def __init__(
|
||||
self,
|
||||
markup: str | bytes | SupportsRead[str] | SupportsRead[bytes] = ...,
|
||||
features: str | Sequence[str] | None = ...,
|
||||
builder: TreeBuilder | type[TreeBuilder] | None = ...,
|
||||
parse_only: SoupStrainer | None = ...,
|
||||
from_encoding: str | None = ...,
|
||||
exclude_encodings: Sequence[str] | None = ...,
|
||||
element_classes: dict[type[PageElement], type[Any]] | None = ...,
|
||||
markup: str | bytes | SupportsRead[str] | SupportsRead[bytes] = "",
|
||||
features: str | Sequence[str] | None = None,
|
||||
builder: TreeBuilder | type[TreeBuilder] | None = None,
|
||||
parse_only: SoupStrainer | None = None,
|
||||
from_encoding: str | None = None,
|
||||
exclude_encodings: Sequence[str] | None = None,
|
||||
element_classes: dict[type[PageElement], type[Any]] | None = None,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
@@ -58,35 +58,35 @@ class BeautifulSoup(Tag):
|
||||
def new_tag(
|
||||
self,
|
||||
name,
|
||||
namespace: Incomplete | None = ...,
|
||||
nsprefix: Incomplete | None = ...,
|
||||
attrs=...,
|
||||
sourceline: Incomplete | None = ...,
|
||||
sourcepos: Incomplete | None = ...,
|
||||
namespace: Incomplete | None = None,
|
||||
nsprefix: Incomplete | None = None,
|
||||
attrs={},
|
||||
sourceline: Incomplete | None = None,
|
||||
sourcepos: Incomplete | None = None,
|
||||
**kwattrs,
|
||||
) -> Tag: ...
|
||||
def string_container(self, base_class: Incomplete | None = ...): ...
|
||||
def new_string(self, s, subclass: Incomplete | None = ...): ...
|
||||
def string_container(self, base_class: Incomplete | None = None): ...
|
||||
def new_string(self, s, subclass: Incomplete | None = None): ...
|
||||
def insert_before(self, *args) -> None: ...
|
||||
def insert_after(self, *args) -> None: ...
|
||||
def popTag(self): ...
|
||||
def pushTag(self, tag) -> None: ...
|
||||
def endData(self, containerClass: Incomplete | None = ...) -> None: ...
|
||||
def object_was_parsed(self, o, parent: Incomplete | None = ..., most_recent_element: Incomplete | None = ...) -> None: ...
|
||||
def endData(self, containerClass: Incomplete | None = None) -> None: ...
|
||||
def object_was_parsed(self, o, parent: Incomplete | None = None, most_recent_element: Incomplete | None = None) -> None: ...
|
||||
def handle_starttag(
|
||||
self,
|
||||
name,
|
||||
namespace,
|
||||
nsprefix,
|
||||
attrs,
|
||||
sourceline: Incomplete | None = ...,
|
||||
sourcepos: Incomplete | None = ...,
|
||||
namespaces: dict[str, str] | None = ...,
|
||||
sourceline: Incomplete | None = None,
|
||||
sourcepos: Incomplete | None = None,
|
||||
namespaces: dict[str, str] | None = None,
|
||||
): ...
|
||||
def handle_endtag(self, name, nsprefix: Incomplete | None = ...) -> None: ...
|
||||
def handle_endtag(self, name, nsprefix: Incomplete | None = None) -> None: ...
|
||||
def handle_data(self, data) -> None: ...
|
||||
def decode( # type: ignore[override]
|
||||
self, pretty_print: bool = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...
|
||||
self, pretty_print: bool = False, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
|
||||
): ... # missing some arguments
|
||||
|
||||
class BeautifulStoneSoup(BeautifulSoup): ...
|
||||
|
||||
@@ -35,9 +35,9 @@ class TreeBuilder:
|
||||
def prepare_markup(
|
||||
self,
|
||||
markup,
|
||||
user_specified_encoding: Incomplete | None = ...,
|
||||
document_declared_encoding: Incomplete | None = ...,
|
||||
exclude_encodings: Incomplete | None = ...,
|
||||
user_specified_encoding: Incomplete | None = None,
|
||||
document_declared_encoding: Incomplete | None = None,
|
||||
exclude_encodings: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def test_fragment_to_document(self, fragment): ...
|
||||
def set_up_substitutions(self, tag): ...
|
||||
|
||||
@@ -11,8 +11,8 @@ class BeautifulSoupHTMLParser(HTMLParser):
|
||||
already_closed_empty_element: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def handle_startendtag(self, name, attrs) -> None: ...
|
||||
def handle_starttag(self, name, attrs, handle_empty_element: bool = ...) -> None: ...
|
||||
def handle_endtag(self, name, check_already_closed: bool = ...) -> None: ...
|
||||
def handle_starttag(self, name, attrs, handle_empty_element: bool = True) -> None: ...
|
||||
def handle_endtag(self, name, check_already_closed: bool = True) -> None: ...
|
||||
def handle_data(self, data) -> None: ...
|
||||
def handle_charref(self, name) -> None: ...
|
||||
def handle_entityref(self, name) -> None: ...
|
||||
@@ -28,12 +28,12 @@ class HTMLParserTreeBuilder(HTMLTreeBuilder):
|
||||
features: Any
|
||||
TRACKS_LINE_NUMBERS: bool
|
||||
parser_args: Any
|
||||
def __init__(self, parser_args: Incomplete | None = ..., parser_kwargs: Incomplete | None = ..., **kwargs) -> None: ...
|
||||
def __init__(self, parser_args: Incomplete | None = None, parser_kwargs: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def prepare_markup(
|
||||
self,
|
||||
markup,
|
||||
user_specified_encoding: Incomplete | None = ...,
|
||||
document_declared_encoding: Incomplete | None = ...,
|
||||
exclude_encodings: Incomplete | None = ...,
|
||||
user_specified_encoding: Incomplete | None = None,
|
||||
document_declared_encoding: Incomplete | None = None,
|
||||
exclude_encodings: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def feed(self, markup) -> None: ...
|
||||
|
||||
@@ -19,18 +19,18 @@ class LXMLTreeBuilderForXML(TreeBuilder):
|
||||
empty_element_tags: Any
|
||||
soup: Any
|
||||
nsmaps: Any
|
||||
def __init__(self, parser: Incomplete | None = ..., empty_element_tags: Incomplete | None = ..., **kwargs) -> None: ...
|
||||
def __init__(self, parser: Incomplete | None = None, empty_element_tags: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def prepare_markup( # type: ignore[override] # the order of the parameters is different
|
||||
self,
|
||||
markup,
|
||||
user_specified_encoding: Incomplete | None = ...,
|
||||
exclude_encodings: Incomplete | None = ...,
|
||||
document_declared_encoding: Incomplete | None = ...,
|
||||
user_specified_encoding: Incomplete | None = None,
|
||||
exclude_encodings: Incomplete | None = None,
|
||||
document_declared_encoding: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
parser: Any
|
||||
def feed(self, markup) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def start(self, name, attrs, nsmap=...) -> None: ...
|
||||
def start(self, name, attrs, nsmap={}) -> None: ...
|
||||
def end(self, name) -> None: ...
|
||||
def pi(self, target, data) -> None: ...
|
||||
def data(self, content) -> None: ...
|
||||
|
||||
@@ -20,9 +20,9 @@ class EntitySubstitution:
|
||||
@classmethod
|
||||
def quoted_attribute_value(cls, value): ...
|
||||
@classmethod
|
||||
def substitute_xml(cls, value, make_quoted_attribute: bool = ...): ...
|
||||
def substitute_xml(cls, value, make_quoted_attribute: bool = False): ...
|
||||
@classmethod
|
||||
def substitute_xml_containing_entities(cls, value, make_quoted_attribute: bool = ...): ...
|
||||
def substitute_xml_containing_entities(cls, value, make_quoted_attribute: bool = False): ...
|
||||
@classmethod
|
||||
def substitute_html(cls, s): ...
|
||||
|
||||
@@ -38,18 +38,18 @@ class EncodingDetector:
|
||||
def __init__(
|
||||
self,
|
||||
markup,
|
||||
known_definite_encodings: Iterable[str] | None = ...,
|
||||
is_html: bool = ...,
|
||||
exclude_encodings: list[str] | None = ...,
|
||||
user_encodings: list[str] | None = ...,
|
||||
override_encodings: list[str] | None = ...,
|
||||
known_definite_encodings: Iterable[str] | None = None,
|
||||
is_html: bool = False,
|
||||
exclude_encodings: list[str] | None = None,
|
||||
user_encodings: list[str] | None = None,
|
||||
override_encodings: list[str] | None = None,
|
||||
) -> None: ...
|
||||
@property
|
||||
def encodings(self) -> Iterator[str]: ...
|
||||
@classmethod
|
||||
def strip_byte_order_mark(cls, data): ...
|
||||
@classmethod
|
||||
def find_declared_encoding(cls, markup, is_html: bool = ..., search_entire_document: bool = ...) -> str | None: ...
|
||||
def find_declared_encoding(cls, markup, is_html: bool = False, search_entire_document: bool = False) -> str | None: ...
|
||||
|
||||
class UnicodeDammit:
|
||||
CHARSET_ALIASES: dict[str, str]
|
||||
@@ -66,12 +66,12 @@ class UnicodeDammit:
|
||||
def __init__(
|
||||
self,
|
||||
markup,
|
||||
known_definite_encodings: list[str] | None = ...,
|
||||
smart_quotes_to: Literal["ascii", "xml", "html"] | None = ...,
|
||||
is_html: bool = ...,
|
||||
exclude_encodings: list[str] | None = ...,
|
||||
user_encodings: list[str] | None = ...,
|
||||
override_encodings: list[str] | None = ...,
|
||||
known_definite_encodings: list[str] | None = [],
|
||||
smart_quotes_to: Literal["ascii", "xml", "html"] | None = None,
|
||||
is_html: bool = False,
|
||||
exclude_encodings: list[str] | None = [],
|
||||
user_encodings: list[str] | None = None,
|
||||
override_encodings: list[str] | None = None,
|
||||
) -> None: ...
|
||||
@property
|
||||
def declared_html_encoding(self) -> str | None: ...
|
||||
@@ -83,4 +83,4 @@ class UnicodeDammit:
|
||||
FIRST_MULTIBYTE_MARKER: int
|
||||
LAST_MULTIBYTE_MARKER: int
|
||||
@classmethod
|
||||
def detwingle(cls, in_bytes: bytes, main_encoding: str = ..., embedded_encoding: str = ...) -> bytes: ...
|
||||
def detwingle(cls, in_bytes: bytes, main_encoding: str = "utf8", embedded_encoding: str = "windows-1252") -> bytes: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from html.parser import HTMLParser
|
||||
|
||||
def diagnose(data) -> None: ...
|
||||
def lxml_trace(data, html: bool = ..., **kwargs) -> None: ...
|
||||
def lxml_trace(data, html: bool = True, **kwargs) -> None: ...
|
||||
|
||||
class AnnouncingParser(HTMLParser):
|
||||
def handle_starttag(self, name, attrs) -> None: ...
|
||||
@@ -15,8 +15,8 @@ class AnnouncingParser(HTMLParser):
|
||||
def handle_pi(self, data) -> None: ...
|
||||
|
||||
def htmlparser_trace(data) -> None: ...
|
||||
def rword(length: int = ...): ...
|
||||
def rsentence(length: int = ...): ...
|
||||
def rdoc(num_elements: int = ...): ...
|
||||
def benchmark_parsers(num_elements: int = ...) -> None: ...
|
||||
def profile(num_elements: int = ..., parser: str = ...) -> None: ...
|
||||
def rword(length: int = 5): ...
|
||||
def rsentence(length: int = 4): ...
|
||||
def rdoc(num_elements: int = 1000): ...
|
||||
def benchmark_parsers(num_elements: int = 100000) -> None: ...
|
||||
def profile(num_elements: int = 100000, parser: str = "lxml") -> None: ...
|
||||
|
||||
@@ -14,7 +14,7 @@ whitespace_re: Pattern[str]
|
||||
PYTHON_SPECIFIC_ENCODINGS: set[str]
|
||||
|
||||
class NamespacedAttribute(str):
|
||||
def __new__(cls, prefix: str, name: str | None = ..., namespace: str | None = ...) -> Self: ...
|
||||
def __new__(cls, prefix: str, name: str | None = None, namespace: str | None = None) -> Self: ...
|
||||
|
||||
class AttributeValueWithCharsetSubstitution(str): ...
|
||||
|
||||
@@ -41,11 +41,11 @@ class PageElement:
|
||||
previous_sibling: PageElement | None
|
||||
def setup(
|
||||
self,
|
||||
parent: Tag | None = ...,
|
||||
previous_element: PageElement | None = ...,
|
||||
next_element: PageElement | None = ...,
|
||||
previous_sibling: PageElement | None = ...,
|
||||
next_sibling: PageElement | None = ...,
|
||||
parent: Tag | None = None,
|
||||
previous_element: PageElement | None = None,
|
||||
next_element: PageElement | None = None,
|
||||
previous_sibling: PageElement | None = None,
|
||||
next_sibling: PageElement | None = None,
|
||||
) -> None: ...
|
||||
def format_string(self, s: str, formatter: Formatter | str | None) -> str: ...
|
||||
def formatter_for_name(self, formatter: Formatter | str | _EntitySubstitution): ...
|
||||
@@ -53,7 +53,7 @@ class PageElement:
|
||||
previousSibling: PageElement | None
|
||||
@property
|
||||
def stripped_strings(self) -> Iterator[str]: ...
|
||||
def get_text(self, separator: str = ..., strip: bool = ..., types: tuple[type[NavigableString], ...] = ...) -> str: ...
|
||||
def get_text(self, separator: str = "", strip: bool = False, types: tuple[type[NavigableString], ...] = ...) -> str: ...
|
||||
getText = get_text
|
||||
@property
|
||||
def text(self) -> str: ...
|
||||
@@ -63,7 +63,7 @@ class PageElement:
|
||||
replace_with_children = unwrap
|
||||
replaceWithChildren = unwrap
|
||||
def wrap(self, wrap_inside: _PageElementT) -> _PageElementT: ...
|
||||
def extract(self, _self_index: int | None = ...) -> Self: ...
|
||||
def extract(self, _self_index: int | None = None) -> Self: ...
|
||||
def insert(self, position: int, new_child: PageElement | str) -> None: ...
|
||||
def append(self, tag: PageElement | str) -> None: ...
|
||||
def extend(self, tags: Iterable[PageElement | str]) -> None: ...
|
||||
@@ -71,87 +71,87 @@ class PageElement:
|
||||
def insert_after(self, *args: PageElement | str) -> None: ...
|
||||
def find_next(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> Tag | NavigableString | None: ...
|
||||
findNext = find_next
|
||||
def find_all_next(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
limit: int | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
limit: int | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> ResultSet[PageElement]: ...
|
||||
findAllNext = find_all_next
|
||||
def find_next_sibling(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> Tag | NavigableString | None: ...
|
||||
findNextSibling = find_next_sibling
|
||||
def find_next_siblings(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
limit: int | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
limit: int | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> ResultSet[PageElement]: ...
|
||||
findNextSiblings = find_next_siblings
|
||||
fetchNextSiblings = find_next_siblings
|
||||
def find_previous(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> Tag | NavigableString | None: ...
|
||||
findPrevious = find_previous
|
||||
def find_all_previous(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
limit: int | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
limit: int | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> ResultSet[PageElement]: ...
|
||||
findAllPrevious = find_all_previous
|
||||
fetchPrevious = find_all_previous
|
||||
def find_previous_sibling(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> Tag | NavigableString | None: ...
|
||||
findPreviousSibling = find_previous_sibling
|
||||
def find_previous_siblings(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
limit: int | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
limit: int | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> ResultSet[PageElement]: ...
|
||||
findPreviousSiblings = find_previous_siblings
|
||||
fetchPreviousSiblings = find_previous_siblings
|
||||
def find_parent(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
**kwargs: _Strainable,
|
||||
) -> Tag | None: ...
|
||||
findParent = find_parent
|
||||
def find_parents(
|
||||
self,
|
||||
name: _Strainable | SoupStrainer | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
limit: int | None = ...,
|
||||
name: _Strainable | SoupStrainer | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
limit: int | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> ResultSet[Tag]: ...
|
||||
findParents = find_parents
|
||||
@@ -185,7 +185,7 @@ class NavigableString(str, PageElement):
|
||||
def __new__(cls, value: str | bytes) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __getnewargs__(self) -> tuple[str]: ...
|
||||
def output_ready(self, formatter: Formatter | str | None = ...) -> str: ...
|
||||
def output_ready(self, formatter: Formatter | str | None = "minimal") -> str: ...
|
||||
@property
|
||||
def name(self) -> None: ...
|
||||
@property
|
||||
@@ -194,7 +194,7 @@ class NavigableString(str, PageElement):
|
||||
class PreformattedString(NavigableString):
|
||||
PREFIX: str
|
||||
SUFFIX: str
|
||||
def output_ready(self, formatter: Formatter | str | None = ...) -> str: ...
|
||||
def output_ready(self, formatter: Formatter | str | None = None) -> str: ...
|
||||
|
||||
class CData(PreformattedString):
|
||||
PREFIX: str
|
||||
@@ -242,22 +242,22 @@ class Tag(PageElement):
|
||||
preserve_whitespace_tags: list[str] | None
|
||||
def __init__(
|
||||
self,
|
||||
parser: BeautifulSoup | None = ...,
|
||||
builder: TreeBuilder | None = ...,
|
||||
name: str | None = ...,
|
||||
namespace: str | None = ...,
|
||||
prefix: str | None = ...,
|
||||
attrs: dict[str, str] | None = ...,
|
||||
parent: Tag | None = ...,
|
||||
previous: PageElement | None = ...,
|
||||
is_xml: bool | None = ...,
|
||||
sourceline: int | None = ...,
|
||||
sourcepos: int | None = ...,
|
||||
can_be_empty_element: bool | None = ...,
|
||||
cdata_list_attributes: list[str] | None = ...,
|
||||
preserve_whitespace_tags: list[str] | None = ...,
|
||||
interesting_string_types: type[NavigableString] | tuple[type[NavigableString], ...] | None = ...,
|
||||
namespaces: dict[str, str] | None = ...,
|
||||
parser: BeautifulSoup | None = None,
|
||||
builder: TreeBuilder | None = None,
|
||||
name: str | None = None,
|
||||
namespace: str | None = None,
|
||||
prefix: str | None = None,
|
||||
attrs: dict[str, str] | None = None,
|
||||
parent: Tag | None = None,
|
||||
previous: PageElement | None = None,
|
||||
is_xml: bool | None = None,
|
||||
sourceline: int | None = None,
|
||||
sourcepos: int | None = None,
|
||||
can_be_empty_element: bool | None = None,
|
||||
cdata_list_attributes: list[str] | None = None,
|
||||
preserve_whitespace_tags: list[str] | None = None,
|
||||
interesting_string_types: type[NavigableString] | tuple[type[NavigableString], ...] | None = None,
|
||||
namespaces: dict[str, str] | None = None,
|
||||
) -> None: ...
|
||||
parserClass: type[BeautifulSoup] | None
|
||||
def __copy__(self) -> Self: ...
|
||||
@@ -273,11 +273,11 @@ class Tag(PageElement):
|
||||
@property
|
||||
def strings(self) -> Iterable[str]: ...
|
||||
def decompose(self) -> None: ...
|
||||
def clear(self, decompose: bool = ...) -> None: ...
|
||||
def clear(self, decompose: bool = False) -> None: ...
|
||||
def smooth(self) -> None: ...
|
||||
def index(self, element: PageElement) -> int: ...
|
||||
def get(self, key: str, default: str | list[str] | None = ...) -> str | list[str] | None: ...
|
||||
def get_attribute_list(self, key: str, default: str | list[str] | None = ...) -> list[str]: ...
|
||||
def get(self, key: str, default: str | list[str] | None = None) -> str | list[str] | None: ...
|
||||
def get_attribute_list(self, key: str, default: str | list[str] | None = None) -> list[str]: ...
|
||||
def has_attr(self, key: str) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __getitem__(self, key: str) -> str | list[str]: ...
|
||||
@@ -292,34 +292,42 @@ class Tag(PageElement):
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __unicode__(self) -> str: ...
|
||||
def encode(
|
||||
self, encoding: str = ..., indent_level: int | None = ..., formatter: str | Formatter = ..., errors: str = ...
|
||||
self,
|
||||
encoding: str = "utf-8",
|
||||
indent_level: int | None = None,
|
||||
formatter: str | Formatter = "minimal",
|
||||
errors: str = "xmlcharrefreplace",
|
||||
) -> bytes: ...
|
||||
def decode(self, indent_level: int | None = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...) -> str: ...
|
||||
@overload
|
||||
def prettify(self, encoding: str, formatter: str | Formatter = ...) -> bytes: ...
|
||||
@overload
|
||||
def prettify(self, encoding: None = ..., formatter: str | Formatter = ...) -> str: ...
|
||||
def decode_contents(
|
||||
self, indent_level: int | None = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...
|
||||
def decode(
|
||||
self, indent_level: int | None = None, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
|
||||
) -> str: ...
|
||||
def encode_contents(self, indent_level: int | None = ..., encoding: str = ..., formatter: str | Formatter = ...) -> bytes: ...
|
||||
def renderContents(self, encoding: str = ..., prettyPrint: bool = ..., indentLevel: int = ...) -> bytes: ...
|
||||
@overload
|
||||
def prettify(self, encoding: str, formatter: str | Formatter = "minimal") -> bytes: ...
|
||||
@overload
|
||||
def prettify(self, encoding: None = None, formatter: str | Formatter = "minimal") -> str: ...
|
||||
def decode_contents(
|
||||
self, indent_level: int | None = None, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
|
||||
) -> str: ...
|
||||
def encode_contents(
|
||||
self, indent_level: int | None = None, encoding: str = "utf-8", formatter: str | Formatter = "minimal"
|
||||
) -> bytes: ...
|
||||
def renderContents(self, encoding: str = "utf-8", prettyPrint: bool = False, indentLevel: int = 0) -> bytes: ...
|
||||
def find(
|
||||
self,
|
||||
name: _Strainable | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
recursive: bool = ...,
|
||||
string: _Strainable | None = ...,
|
||||
name: _Strainable | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
recursive: bool = True,
|
||||
string: _Strainable | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> Tag | NavigableString | None: ...
|
||||
findChild = find
|
||||
def find_all(
|
||||
self,
|
||||
name: _Strainable | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
recursive: bool = ...,
|
||||
string: _Strainable | None = ...,
|
||||
limit: int | None = ...,
|
||||
name: _Strainable | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
recursive: bool = True,
|
||||
string: _Strainable | None = None,
|
||||
limit: int | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> ResultSet[Any]: ...
|
||||
__call__ = find_all
|
||||
@@ -330,13 +338,13 @@ class Tag(PageElement):
|
||||
@property
|
||||
def descendants(self) -> Iterable[PageElement]: ...
|
||||
def select_one(
|
||||
self, selector: str, namespaces: Incomplete | None = ..., *, flags: int = ..., custom: dict[str, str] | None = ...
|
||||
self, selector: str, namespaces: Incomplete | None = None, *, flags: int = ..., custom: dict[str, str] | None = ...
|
||||
) -> Tag | None: ...
|
||||
def select(
|
||||
self,
|
||||
selector: str,
|
||||
namespaces: Incomplete | None = ...,
|
||||
limit: int | None = ...,
|
||||
namespaces: Incomplete | None = None,
|
||||
limit: int | None = None,
|
||||
*,
|
||||
flags: int = ...,
|
||||
custom: dict[str, str] | None = ...,
|
||||
@@ -351,12 +359,12 @@ class SoupStrainer:
|
||||
string: _NormalizedStrainable
|
||||
def __init__(
|
||||
self,
|
||||
name: _Strainable | None = ...,
|
||||
attrs: dict[str, _Strainable] | _Strainable = ...,
|
||||
string: _Strainable | None = ...,
|
||||
name: _Strainable | None = None,
|
||||
attrs: dict[str, _Strainable] | _Strainable = {},
|
||||
string: _Strainable | None = None,
|
||||
**kwargs: _Strainable,
|
||||
) -> None: ...
|
||||
def search_tag(self, markup_name: Tag | str | None = ..., markup_attrs=...): ...
|
||||
def search_tag(self, markup_name: Tag | str | None = None, markup_attrs={}): ...
|
||||
searchTag = search_tag
|
||||
def search(self, markup: PageElement | Iterable[PageElement]): ...
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ class Formatter(EntitySubstitution):
|
||||
empty_attributes_are_booleans: bool
|
||||
def __init__(
|
||||
self,
|
||||
language: str | None = ...,
|
||||
entity_substitution: _EntitySubstitution | None = ...,
|
||||
void_element_close_prefix: str = ...,
|
||||
cdata_containing_tags: list[str] | None = ...,
|
||||
empty_attributes_are_booleans: bool = ...,
|
||||
indent: int = ...,
|
||||
language: str | None = None,
|
||||
entity_substitution: _EntitySubstitution | None = None,
|
||||
void_element_close_prefix: str = "/",
|
||||
cdata_containing_tags: list[str] | None = None,
|
||||
empty_attributes_are_booleans: bool = False,
|
||||
indent: int = 1,
|
||||
) -> None: ...
|
||||
def substitute(self, ns: str) -> str: ...
|
||||
def attribute_value(self, value: str) -> str: ...
|
||||
|
||||
@@ -24,10 +24,10 @@ def clean(
|
||||
tags: Iterable[str] = ...,
|
||||
attributes: _Attributes = ...,
|
||||
protocols: Iterable[str] = ...,
|
||||
strip: bool = ...,
|
||||
strip_comments: bool = ...,
|
||||
css_sanitizer: CSSSanitizer | None = ...,
|
||||
strip: bool = False,
|
||||
strip_comments: bool = True,
|
||||
css_sanitizer: CSSSanitizer | None = None,
|
||||
) -> str: ...
|
||||
def linkify(
|
||||
text: str, callbacks: Iterable[_Callback] = ..., skip_tags: Container[str] | None = ..., parse_email: bool = ...
|
||||
text: str, callbacks: Iterable[_Callback] = ..., skip_tags: Container[str] | None = None, parse_email: bool = False
|
||||
) -> str: ...
|
||||
|
||||
@@ -9,5 +9,5 @@ _HTMLAttrs: TypeAlias = MutableMapping[_HTMLAttrKey, str]
|
||||
class _Callback(Protocol): # noqa: Y046
|
||||
def __call__(self, attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
|
||||
|
||||
def nofollow(attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
|
||||
def target_blank(attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
|
||||
def nofollow(attrs: _HTMLAttrs, new: bool = False) -> _HTMLAttrs: ...
|
||||
def target_blank(attrs: _HTMLAttrs, new: bool = False) -> _HTMLAttrs: ...
|
||||
|
||||
@@ -22,6 +22,6 @@ class BleachHTMLParser(HTMLParser):
|
||||
class BleachHTMLSerializer(HTMLSerializer):
|
||||
escape_rcdata: bool
|
||||
def escape_base_amp(self, stoken: str) -> Generator[str, None, None]: ...
|
||||
def serialize(self, treewalker, encoding: str | None = ...) -> Generator[str, None, None]: ...
|
||||
def serialize(self, treewalker, encoding: str | None = None) -> Generator[str, None, None]: ...
|
||||
|
||||
def __getattr__(__name: str) -> Incomplete: ...
|
||||
|
||||
@@ -42,10 +42,10 @@ class Cleaner:
|
||||
tags: Iterable[str] = ...,
|
||||
attributes: _Attributes = ...,
|
||||
protocols: Iterable[str] = ...,
|
||||
strip: bool = ...,
|
||||
strip_comments: bool = ...,
|
||||
filters: Iterable[_Filter] | None = ...,
|
||||
css_sanitizer: CSSSanitizer | None = ...,
|
||||
strip: bool = False,
|
||||
strip_comments: bool = True,
|
||||
filters: Iterable[_Filter] | None = None,
|
||||
css_sanitizer: CSSSanitizer | None = None,
|
||||
) -> None: ...
|
||||
def clean(self, text: str) -> str: ...
|
||||
|
||||
|
||||
@@ -21,108 +21,121 @@ class NullHandler(logging.Handler):
|
||||
log: Any
|
||||
perflog: Any
|
||||
|
||||
def set_file_logger(name, filepath, level: Any = ..., format_string: Incomplete | None = ...): ...
|
||||
def set_stream_logger(name, level: Any = ..., format_string: Incomplete | None = ...): ...
|
||||
def connect_sqs(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_s3(aws_access_key_id: str | None = ..., aws_secret_access_key: str | None = ..., **kwargs) -> S3Connection: ...
|
||||
def connect_gs(gs_access_key_id: Incomplete | None = ..., gs_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_ec2(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_elb(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_autoscale(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_cloudwatch(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_sdb(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_fps(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_mturk(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_cloudfront(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_vpc(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_rds(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_rds2(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_emr(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_sns(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_iam(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_route53(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def set_file_logger(name, filepath, level: Any = 20, format_string: Incomplete | None = None): ...
|
||||
def set_stream_logger(name, level: Any = 10, format_string: Incomplete | None = None): ...
|
||||
def connect_sqs(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_s3(aws_access_key_id: str | None = None, aws_secret_access_key: str | None = None, **kwargs) -> S3Connection: ...
|
||||
def connect_gs(gs_access_key_id: Incomplete | None = None, gs_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_ec2(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_elb(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_autoscale(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_cloudwatch(
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_sdb(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_fps(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_mturk(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_cloudfront(
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_vpc(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_rds(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_rds2(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_emr(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_sns(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_iam(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_route53(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_cloudformation(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_euca(
|
||||
host: Incomplete | None = ...,
|
||||
aws_access_key_id: Incomplete | None = ...,
|
||||
aws_secret_access_key: Incomplete | None = ...,
|
||||
port: int = ...,
|
||||
path: str = ...,
|
||||
is_secure: bool = ...,
|
||||
host: Incomplete | None = None,
|
||||
aws_access_key_id: Incomplete | None = None,
|
||||
aws_secret_access_key: Incomplete | None = None,
|
||||
port: int = 8773,
|
||||
path: str = "/services/Eucalyptus",
|
||||
is_secure: bool = False,
|
||||
**kwargs,
|
||||
): ...
|
||||
def connect_glacier(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_glacier(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_ec2_endpoint(
|
||||
url, aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
url, aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_walrus(
|
||||
host: Incomplete | None = ...,
|
||||
aws_access_key_id: Incomplete | None = ...,
|
||||
aws_secret_access_key: Incomplete | None = ...,
|
||||
port: int = ...,
|
||||
path: str = ...,
|
||||
is_secure: bool = ...,
|
||||
host: Incomplete | None = None,
|
||||
aws_access_key_id: Incomplete | None = None,
|
||||
aws_secret_access_key: Incomplete | None = None,
|
||||
port: int = 8773,
|
||||
path: str = "/services/Walrus",
|
||||
is_secure: bool = False,
|
||||
**kwargs,
|
||||
): ...
|
||||
def connect_ses(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_sts(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_ses(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_sts(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_ia(
|
||||
ia_access_key_id: Incomplete | None = ..., ia_secret_access_key: Incomplete | None = ..., is_secure: bool = ..., **kwargs
|
||||
ia_access_key_id: Incomplete | None = None, ia_secret_access_key: Incomplete | None = None, is_secure: bool = False, **kwargs
|
||||
): ...
|
||||
def connect_dynamodb(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_swf(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_cloudsearch(
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_dynamodb(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_swf(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_cloudsearch(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_cloudsearch2(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., sign_request: bool = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None,
|
||||
aws_secret_access_key: Incomplete | None = None,
|
||||
sign_request: bool = False,
|
||||
**kwargs,
|
||||
): ...
|
||||
def connect_cloudsearchdomain(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_beanstalk(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_beanstalk(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_elastictranscoder(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_opsworks(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_redshift(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_support(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_cloudtrail(
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_opsworks(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_redshift(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_support(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_cloudtrail(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_directconnect(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_kinesis(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_logs(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_kinesis(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_logs(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_route53domains(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_cognito_identity(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_cognito_sync(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_kms(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_awslambda(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_codedeploy(
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_kms(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_awslambda(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_codedeploy(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_configservice(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_cloudhsm(aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs): ...
|
||||
def connect_cloudhsm(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ...
|
||||
def connect_ec2containerservice(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def connect_machinelearning(
|
||||
aws_access_key_id: Incomplete | None = ..., aws_secret_access_key: Incomplete | None = ..., **kwargs
|
||||
aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs
|
||||
): ...
|
||||
def storage_uri(
|
||||
uri_str,
|
||||
default_scheme: str = ...,
|
||||
debug: int = ...,
|
||||
validate: bool = ...,
|
||||
default_scheme: str = "file",
|
||||
debug: int = 0,
|
||||
validate: bool = True,
|
||||
bucket_storage_uri_class: Any = ...,
|
||||
suppress_consec_slashes: bool = ...,
|
||||
is_latest: bool = ...,
|
||||
suppress_consec_slashes: bool = True,
|
||||
is_latest: bool = False,
|
||||
): ...
|
||||
def storage_uri_for_key(key): ...
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class HmacAuthV4Handler(AuthHandler, HmacKeys):
|
||||
service_name: Any
|
||||
region_name: Any
|
||||
def __init__(
|
||||
self, host, config, provider, service_name: Incomplete | None = ..., region_name: Incomplete | None = ...
|
||||
self, host, config, provider, service_name: Incomplete | None = None, region_name: Incomplete | None = None
|
||||
) -> None: ...
|
||||
def headers_to_sign(self, http_request): ...
|
||||
def host_header(self, host, http_request): ...
|
||||
@@ -81,7 +81,7 @@ class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
|
||||
def mangle_path_and_params(self, req): ...
|
||||
def payload(self, http_request): ...
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
def presign(self, req, expires, iso_date: Incomplete | None = ...): ...
|
||||
def presign(self, req, expires, iso_date: Incomplete | None = None): ...
|
||||
|
||||
class STSAnonHandler(AuthHandler):
|
||||
capability: Any
|
||||
@@ -107,6 +107,6 @@ class POSTPathQSV2AuthHandler(QuerySignatureV2AuthHandler, AuthHandler):
|
||||
capability: Any
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
|
||||
def get_auth_handler(host, config, provider, requested_capability: Incomplete | None = ...): ...
|
||||
def get_auth_handler(host, config, provider, requested_capability: Incomplete | None = None): ...
|
||||
def detect_potential_sigv4(func): ...
|
||||
def detect_potential_s3sigv4(func): ...
|
||||
|
||||
@@ -42,7 +42,7 @@ class HTTPRequest:
|
||||
|
||||
class HTTPResponse(http.client.HTTPResponse):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def read(self, amt: Incomplete | None = ...): ...
|
||||
def read(self, amt: Incomplete | None = None): ...
|
||||
|
||||
class AWSAuthConnection:
|
||||
suppress_consec_slashes: Any
|
||||
@@ -67,22 +67,22 @@ class AWSAuthConnection:
|
||||
def __init__(
|
||||
self,
|
||||
host,
|
||||
aws_access_key_id: Incomplete | None = ...,
|
||||
aws_secret_access_key: Incomplete | None = ...,
|
||||
is_secure: bool = ...,
|
||||
port: Incomplete | None = ...,
|
||||
proxy: Incomplete | None = ...,
|
||||
proxy_port: Incomplete | None = ...,
|
||||
proxy_user: Incomplete | None = ...,
|
||||
proxy_pass: Incomplete | None = ...,
|
||||
debug: int = ...,
|
||||
https_connection_factory: Incomplete | None = ...,
|
||||
path: str = ...,
|
||||
provider: str = ...,
|
||||
security_token: Incomplete | None = ...,
|
||||
suppress_consec_slashes: bool = ...,
|
||||
validate_certs: bool = ...,
|
||||
profile_name: Incomplete | None = ...,
|
||||
aws_access_key_id: Incomplete | None = None,
|
||||
aws_secret_access_key: Incomplete | None = None,
|
||||
is_secure: bool = True,
|
||||
port: Incomplete | None = None,
|
||||
proxy: Incomplete | None = None,
|
||||
proxy_port: Incomplete | None = None,
|
||||
proxy_user: Incomplete | None = None,
|
||||
proxy_pass: Incomplete | None = None,
|
||||
debug: int = 0,
|
||||
https_connection_factory: Incomplete | None = None,
|
||||
path: str = "/",
|
||||
provider: str = "aws",
|
||||
security_token: Incomplete | None = None,
|
||||
suppress_consec_slashes: bool = True,
|
||||
validate_certs: bool = True,
|
||||
profile_name: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
auth_region_name: Any
|
||||
@property
|
||||
@@ -101,8 +101,8 @@ class AWSAuthConnection:
|
||||
def secret_key(self): ...
|
||||
@property
|
||||
def profile_name(self): ...
|
||||
def get_path(self, path: str = ...): ...
|
||||
def server_name(self, port: Incomplete | None = ...): ...
|
||||
def get_path(self, path: str = "/"): ...
|
||||
def server_name(self, port: Incomplete | None = None): ...
|
||||
proxy: Any
|
||||
proxy_port: Any
|
||||
proxy_user: Any
|
||||
@@ -114,8 +114,8 @@ class AWSAuthConnection:
|
||||
def skip_proxy(self, host): ...
|
||||
def new_http_connection(self, host, port, is_secure): ...
|
||||
def put_http_connection(self, host, port, is_secure, connection): ...
|
||||
def proxy_ssl(self, host: Incomplete | None = ..., port: Incomplete | None = ...): ...
|
||||
def prefix_proxy_to_path(self, path, host: Incomplete | None = ...): ...
|
||||
def proxy_ssl(self, host: Incomplete | None = None, port: Incomplete | None = None): ...
|
||||
def prefix_proxy_to_path(self, path, host: Incomplete | None = None): ...
|
||||
def get_proxy_auth_header(self): ...
|
||||
def get_proxy_url_with_auth(self): ...
|
||||
def set_host_header(self, request): ...
|
||||
@@ -125,23 +125,23 @@ class AWSAuthConnection:
|
||||
method,
|
||||
path,
|
||||
auth_path,
|
||||
params: Incomplete | None = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
data: str = ...,
|
||||
host: Incomplete | None = ...,
|
||||
params: Incomplete | None = None,
|
||||
headers: Incomplete | None = None,
|
||||
data: str = "",
|
||||
host: Incomplete | None = None,
|
||||
): ...
|
||||
def make_request(
|
||||
self,
|
||||
method,
|
||||
path,
|
||||
headers: Incomplete | None = ...,
|
||||
data: str = ...,
|
||||
host: Incomplete | None = ...,
|
||||
auth_path: Incomplete | None = ...,
|
||||
sender: Incomplete | None = ...,
|
||||
override_num_retries: Incomplete | None = ...,
|
||||
params: Incomplete | None = ...,
|
||||
retry_handler: Incomplete | None = ...,
|
||||
headers: Incomplete | None = None,
|
||||
data: str = "",
|
||||
host: Incomplete | None = None,
|
||||
auth_path: Incomplete | None = None,
|
||||
sender: Incomplete | None = None,
|
||||
override_num_retries: Incomplete | None = None,
|
||||
params: Incomplete | None = None,
|
||||
retry_handler: Incomplete | None = None,
|
||||
): ...
|
||||
def close(self): ...
|
||||
|
||||
@@ -150,29 +150,29 @@ class AWSQueryConnection(AWSAuthConnection):
|
||||
ResponseError: Any
|
||||
def __init__(
|
||||
self,
|
||||
aws_access_key_id: Incomplete | None = ...,
|
||||
aws_secret_access_key: Incomplete | None = ...,
|
||||
is_secure: bool = ...,
|
||||
port: Incomplete | None = ...,
|
||||
proxy: Incomplete | None = ...,
|
||||
proxy_port: Incomplete | None = ...,
|
||||
proxy_user: Incomplete | None = ...,
|
||||
proxy_pass: Incomplete | None = ...,
|
||||
host: Incomplete | None = ...,
|
||||
debug: int = ...,
|
||||
https_connection_factory: Incomplete | None = ...,
|
||||
path: str = ...,
|
||||
security_token: Incomplete | None = ...,
|
||||
validate_certs: bool = ...,
|
||||
profile_name: Incomplete | None = ...,
|
||||
provider: str = ...,
|
||||
aws_access_key_id: Incomplete | None = None,
|
||||
aws_secret_access_key: Incomplete | None = None,
|
||||
is_secure: bool = True,
|
||||
port: Incomplete | None = None,
|
||||
proxy: Incomplete | None = None,
|
||||
proxy_port: Incomplete | None = None,
|
||||
proxy_user: Incomplete | None = None,
|
||||
proxy_pass: Incomplete | None = None,
|
||||
host: Incomplete | None = None,
|
||||
debug: int = 0,
|
||||
https_connection_factory: Incomplete | None = None,
|
||||
path: str = "/",
|
||||
security_token: Incomplete | None = None,
|
||||
validate_certs: bool = True,
|
||||
profile_name: Incomplete | None = None,
|
||||
provider: str = "aws",
|
||||
) -> None: ...
|
||||
def get_utf8_value(self, value): ...
|
||||
def make_request( # type: ignore[override]
|
||||
self, action, params: Incomplete | None = ..., path: str = ..., verb: str = ..., *args, **kwargs
|
||||
self, action, params: Incomplete | None = None, path: str = "/", verb: str = "GET", *args, **kwargs
|
||||
): ...
|
||||
def build_list_params(self, params, items, label): ...
|
||||
def build_complex_list_params(self, params, items, label, names): ...
|
||||
def get_list(self, action, params, markers, path: str = ..., parent: Incomplete | None = ..., verb: str = ...): ...
|
||||
def get_object(self, action, params, cls, path: str = ..., parent: Incomplete | None = ..., verb: str = ...): ...
|
||||
def get_status(self, action, params, path: str = ..., parent: Incomplete | None = ..., verb: str = ...): ...
|
||||
def get_list(self, action, params, markers, path: str = "/", parent: Incomplete | None = None, verb: str = "GET"): ...
|
||||
def get_object(self, action, params, cls, path: str = "/", parent: Incomplete | None = None, verb: str = "GET"): ...
|
||||
def get_status(self, action, params, path: str = "/", parent: Incomplete | None = None, verb: str = "GET"): ...
|
||||
|
||||
@@ -20,7 +20,7 @@ class BotoServerError(StandardError):
|
||||
error_code: Any
|
||||
message: str
|
||||
box_usage: Any
|
||||
def __init__(self, status, reason, body: Incomplete | None = ..., *args) -> None: ...
|
||||
def __init__(self, status, reason, body: Incomplete | None = None, *args) -> None: ...
|
||||
def __getattr__(self, name: str): ...
|
||||
def __setattr__(self, name: str, value) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
@@ -32,13 +32,13 @@ class ConsoleOutput:
|
||||
timestamp: Any
|
||||
comment: Any
|
||||
output: Any
|
||||
def __init__(self, parent: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, parent: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
class StorageCreateError(BotoServerError):
|
||||
bucket: Any
|
||||
def __init__(self, status, reason, body: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, status, reason, body: Incomplete | None = None) -> None: ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
class S3CreateError(StorageCreateError): ...
|
||||
@@ -50,7 +50,7 @@ class GSCopyError(StorageCopyError): ...
|
||||
class SQSError(BotoServerError):
|
||||
detail: Any
|
||||
type: Any
|
||||
def __init__(self, status, reason, body: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, status, reason, body: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -60,7 +60,7 @@ class SQSDecodeError(BotoClientError):
|
||||
|
||||
class StorageResponseError(BotoServerError):
|
||||
resource: Any
|
||||
def __init__(self, status, reason, body: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, status, reason, body: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -69,7 +69,7 @@ class GSResponseError(StorageResponseError): ...
|
||||
|
||||
class EC2ResponseError(BotoServerError):
|
||||
errors: Any
|
||||
def __init__(self, status, reason, body: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, status, reason, body: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
request_id: Any
|
||||
def endElement(self, name, value, connection): ...
|
||||
@@ -80,7 +80,7 @@ class JSONResponseError(BotoServerError):
|
||||
body: Any
|
||||
error_message: Any
|
||||
error_code: Any
|
||||
def __init__(self, status, reason, body: Incomplete | None = ..., *args) -> None: ...
|
||||
def __init__(self, status, reason, body: Incomplete | None = None, *args) -> None: ...
|
||||
|
||||
class DynamoDBResponseError(JSONResponseError): ...
|
||||
class SWFResponseError(JSONResponseError): ...
|
||||
@@ -90,7 +90,7 @@ class _EC2Error:
|
||||
connection: Any
|
||||
error_code: Any
|
||||
error_message: Any
|
||||
def __init__(self, connection: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, connection: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -141,7 +141,7 @@ class TooManyRecordsException(Exception):
|
||||
class PleaseRetryException(Exception):
|
||||
message: Any
|
||||
response: Any
|
||||
def __init__(self, message, response: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, message, response: Incomplete | None = None) -> None: ...
|
||||
|
||||
class InvalidInstanceMetadataError(Exception):
|
||||
MSG: str
|
||||
|
||||
@@ -17,16 +17,16 @@ class KMSConnection(AWSQueryConnection):
|
||||
self,
|
||||
key_id: str,
|
||||
grantee_principal: str,
|
||||
retiring_principal: str | None = ...,
|
||||
operations: list[str] | None = ...,
|
||||
constraints: dict[str, dict[str, str]] | None = ...,
|
||||
grant_tokens: list[str] | None = ...,
|
||||
retiring_principal: str | None = None,
|
||||
operations: list[str] | None = None,
|
||||
constraints: dict[str, dict[str, str]] | None = None,
|
||||
grant_tokens: list[str] | None = None,
|
||||
) -> dict[str, Any] | None: ...
|
||||
def create_key(
|
||||
self, policy: str | None = ..., description: str | None = ..., key_usage: str | None = ...
|
||||
self, policy: str | None = None, description: str | None = None, key_usage: str | None = None
|
||||
) -> dict[str, Any] | None: ...
|
||||
def decrypt(
|
||||
self, ciphertext_blob: bytes, encryption_context: Mapping[str, Any] | None = ..., grant_tokens: list[str] | None = ...
|
||||
self, ciphertext_blob: bytes, encryption_context: Mapping[str, Any] | None = None, grant_tokens: list[str] | None = None
|
||||
) -> dict[str, Any] | None: ...
|
||||
def delete_alias(self, alias_name: str) -> dict[str, Any] | None: ...
|
||||
def describe_key(self, key_id: str) -> dict[str, Any] | None: ...
|
||||
@@ -38,40 +38,40 @@ class KMSConnection(AWSQueryConnection):
|
||||
self,
|
||||
key_id: str,
|
||||
plaintext: bytes,
|
||||
encryption_context: Mapping[str, Any] | None = ...,
|
||||
grant_tokens: list[str] | None = ...,
|
||||
encryption_context: Mapping[str, Any] | None = None,
|
||||
grant_tokens: list[str] | None = None,
|
||||
) -> dict[str, Any] | None: ...
|
||||
def generate_data_key(
|
||||
self,
|
||||
key_id: str,
|
||||
encryption_context: Mapping[str, Any] | None = ...,
|
||||
number_of_bytes: int | None = ...,
|
||||
key_spec: str | None = ...,
|
||||
grant_tokens: list[str] | None = ...,
|
||||
encryption_context: Mapping[str, Any] | None = None,
|
||||
number_of_bytes: int | None = None,
|
||||
key_spec: str | None = None,
|
||||
grant_tokens: list[str] | None = None,
|
||||
) -> dict[str, Any] | None: ...
|
||||
def generate_data_key_without_plaintext(
|
||||
self,
|
||||
key_id: str,
|
||||
encryption_context: Mapping[str, Any] | None = ...,
|
||||
key_spec: str | None = ...,
|
||||
number_of_bytes: int | None = ...,
|
||||
grant_tokens: list[str] | None = ...,
|
||||
encryption_context: Mapping[str, Any] | None = None,
|
||||
key_spec: str | None = None,
|
||||
number_of_bytes: int | None = None,
|
||||
grant_tokens: list[str] | None = None,
|
||||
) -> dict[str, Any] | None: ...
|
||||
def generate_random(self, number_of_bytes: int | None = ...) -> dict[str, Any] | None: ...
|
||||
def generate_random(self, number_of_bytes: int | None = None) -> dict[str, Any] | None: ...
|
||||
def get_key_policy(self, key_id: str, policy_name: str) -> dict[str, Any] | None: ...
|
||||
def get_key_rotation_status(self, key_id: str) -> dict[str, Any] | None: ...
|
||||
def list_aliases(self, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
|
||||
def list_grants(self, key_id: str, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
|
||||
def list_key_policies(self, key_id: str, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
|
||||
def list_keys(self, limit: int | None = ..., marker: str | None = ...) -> dict[str, Any] | None: ...
|
||||
def list_aliases(self, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ...
|
||||
def list_grants(self, key_id: str, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ...
|
||||
def list_key_policies(self, key_id: str, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ...
|
||||
def list_keys(self, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ...
|
||||
def put_key_policy(self, key_id: str, policy_name: str, policy: str) -> dict[str, Any] | None: ...
|
||||
def re_encrypt(
|
||||
self,
|
||||
ciphertext_blob: bytes,
|
||||
destination_key_id: str,
|
||||
source_encryption_context: Mapping[str, Any] | None = ...,
|
||||
destination_encryption_context: Mapping[str, Any] | None = ...,
|
||||
grant_tokens: list[str] | None = ...,
|
||||
source_encryption_context: Mapping[str, Any] | None = None,
|
||||
destination_encryption_context: Mapping[str, Any] | None = None,
|
||||
grant_tokens: list[str] | None = None,
|
||||
) -> dict[str, Any] | None: ...
|
||||
def retire_grant(self, grant_token: str) -> dict[str, Any] | None: ...
|
||||
def revoke_grant(self, key_id: str, grant_id: str) -> dict[str, Any] | None: ...
|
||||
|
||||
@@ -6,5 +6,5 @@ class Plugin:
|
||||
@classmethod
|
||||
def is_capable(cls, requested_capability): ...
|
||||
|
||||
def get_plugin(cls, requested_capability: Incomplete | None = ...): ...
|
||||
def get_plugin(cls, requested_capability: Incomplete | None = None): ...
|
||||
def load_plugins(config): ...
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Any
|
||||
def load_endpoint_json(path): ...
|
||||
def merge_endpoints(defaults, additions): ...
|
||||
def load_regions(): ...
|
||||
def get_regions(service_name, region_cls: Incomplete | None = ..., connection_cls: Incomplete | None = ...): ...
|
||||
def get_regions(service_name, region_cls: Incomplete | None = None, connection_cls: Incomplete | None = None): ...
|
||||
|
||||
class RegionInfo:
|
||||
connection: Any
|
||||
@@ -13,10 +13,10 @@ class RegionInfo:
|
||||
connection_cls: Any
|
||||
def __init__(
|
||||
self,
|
||||
connection: Incomplete | None = ...,
|
||||
name: Incomplete | None = ...,
|
||||
endpoint: Incomplete | None = ...,
|
||||
connection_cls: Incomplete | None = ...,
|
||||
connection: Incomplete | None = None,
|
||||
name: Incomplete | None = None,
|
||||
endpoint: Incomplete | None = None,
|
||||
connection_cls: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -10,7 +10,7 @@ class Policy:
|
||||
parent: Any
|
||||
namespace: Any
|
||||
acl: ACL
|
||||
def __init__(self, parent: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, parent: Incomplete | None = None) -> None: ...
|
||||
owner: User
|
||||
def startElement(self, name: str, attrs: dict[str, Any], connection: S3Connection) -> None | User | ACL: ...
|
||||
def endElement(self, name: str, value: Any, connection: S3Connection) -> None: ...
|
||||
@@ -19,10 +19,10 @@ class Policy:
|
||||
class ACL:
|
||||
policy: Policy
|
||||
grants: list[Grant]
|
||||
def __init__(self, policy: Policy | None = ...) -> None: ...
|
||||
def __init__(self, policy: Policy | None = None) -> None: ...
|
||||
def add_grant(self, grant: Grant) -> None: ...
|
||||
def add_email_grant(self, permission: str, email_address: str) -> None: ...
|
||||
def add_user_grant(self, permission: str, user_id: str, display_name: str | None = ...) -> None: ...
|
||||
def add_user_grant(self, permission: str, user_id: str, display_name: str | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name: str, value: Any, connection: S3Connection) -> None: ...
|
||||
def to_xml(self) -> str: ...
|
||||
@@ -37,12 +37,12 @@ class Grant:
|
||||
type: str
|
||||
def __init__(
|
||||
self,
|
||||
permission: str | None = ...,
|
||||
type: str | None = ...,
|
||||
id: str | None = ...,
|
||||
display_name: str | None = ...,
|
||||
uri: str | None = ...,
|
||||
email_address: str | None = ...,
|
||||
permission: str | None = None,
|
||||
type: str | None = None,
|
||||
id: str | None = None,
|
||||
display_name: str | None = None,
|
||||
uri: str | None = None,
|
||||
email_address: str | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name: str, value: Any, connection: S3Connection) -> None: ...
|
||||
|
||||
@@ -21,170 +21,172 @@ class Bucket:
|
||||
name: str
|
||||
connection: S3Connection
|
||||
key_class: type[Key]
|
||||
def __init__(self, connection: S3Connection | None = ..., name: str | None = ..., key_class: type[Key] = ...) -> None: ...
|
||||
def __init__(self, connection: S3Connection | None = None, name: str | None = None, key_class: type[Key] = ...) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __contains__(self, key_name) -> bool: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
creation_date: Any
|
||||
def endElement(self, name, value, connection): ...
|
||||
def set_key_class(self, key_class): ...
|
||||
def lookup(self, key_name, headers: dict[str, str] | None = ...): ...
|
||||
def lookup(self, key_name, headers: dict[str, str] | None = None): ...
|
||||
def get_key(
|
||||
self,
|
||||
key_name,
|
||||
headers: dict[str, str] | None = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
validate: bool = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
version_id: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
validate: bool = True,
|
||||
) -> Key: ...
|
||||
def list(
|
||||
self,
|
||||
prefix: str = ...,
|
||||
delimiter: str = ...,
|
||||
marker: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
prefix: str = "",
|
||||
delimiter: str = "",
|
||||
marker: str = "",
|
||||
headers: dict[str, str] | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
) -> BucketListResultSet: ...
|
||||
def list_versions(
|
||||
self,
|
||||
prefix: str = ...,
|
||||
delimiter: str = ...,
|
||||
key_marker: str = ...,
|
||||
version_id_marker: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
encoding_type: str | None = ...,
|
||||
prefix: str = "",
|
||||
delimiter: str = "",
|
||||
key_marker: str = "",
|
||||
version_id_marker: str = "",
|
||||
headers: dict[str, str] | None = None,
|
||||
encoding_type: str | None = None,
|
||||
) -> BucketListResultSet: ...
|
||||
def list_multipart_uploads(
|
||||
self,
|
||||
key_marker: str = ...,
|
||||
upload_id_marker: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
key_marker: str = "",
|
||||
upload_id_marker: str = "",
|
||||
headers: dict[str, str] | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
): ...
|
||||
def validate_kwarg_names(self, kwargs, names): ...
|
||||
def get_all_keys(self, headers: dict[str, str] | None = ..., **params): ...
|
||||
def get_all_versions(self, headers: dict[str, str] | None = ..., **params): ...
|
||||
def get_all_keys(self, headers: dict[str, str] | None = None, **params): ...
|
||||
def get_all_versions(self, headers: dict[str, str] | None = None, **params): ...
|
||||
def validate_get_all_versions_params(self, params): ...
|
||||
def get_all_multipart_uploads(self, headers: dict[str, str] | None = ..., **params): ...
|
||||
def new_key(self, key_name: Incomplete | None = ...): ...
|
||||
def get_all_multipart_uploads(self, headers: dict[str, str] | None = None, **params): ...
|
||||
def new_key(self, key_name: Incomplete | None = None): ...
|
||||
def generate_url(
|
||||
self,
|
||||
expires_in,
|
||||
method: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
force_http: bool = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
expires_in_absolute: bool = ...,
|
||||
method: str = "GET",
|
||||
headers: dict[str, str] | None = None,
|
||||
force_http: bool = False,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
expires_in_absolute: bool = False,
|
||||
): ...
|
||||
def delete_keys(
|
||||
self, keys, quiet: bool = False, mfa_token: Incomplete | None = None, headers: dict[str, str] | None = None
|
||||
): ...
|
||||
def delete_keys(self, keys, quiet: bool = ..., mfa_token: Incomplete | None = ..., headers: dict[str, str] | None = ...): ...
|
||||
def delete_key(
|
||||
self,
|
||||
key_name,
|
||||
headers: dict[str, str] | None = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
mfa_token: Incomplete | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
version_id: Incomplete | None = None,
|
||||
mfa_token: Incomplete | None = None,
|
||||
): ...
|
||||
def copy_key(
|
||||
self,
|
||||
new_key_name,
|
||||
src_bucket_name,
|
||||
src_key_name,
|
||||
metadata: Incomplete | None = ...,
|
||||
src_version_id: Incomplete | None = ...,
|
||||
storage_class: str = ...,
|
||||
preserve_acl: bool = ...,
|
||||
encrypt_key: bool = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
query_args: Incomplete | None = ...,
|
||||
metadata: Incomplete | None = None,
|
||||
src_version_id: Incomplete | None = None,
|
||||
storage_class: str = "STANDARD",
|
||||
preserve_acl: bool = False,
|
||||
encrypt_key: bool = False,
|
||||
headers: dict[str, str] | None = None,
|
||||
query_args: Incomplete | None = None,
|
||||
): ...
|
||||
def set_canned_acl(
|
||||
self, acl_str, key_name: str = ..., headers: dict[str, str] | None = ..., version_id: Incomplete | None = ...
|
||||
self, acl_str, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None
|
||||
): ...
|
||||
def get_xml_acl(self, key_name: str = ..., headers: dict[str, str] | None = ..., version_id: Incomplete | None = ...): ...
|
||||
def get_xml_acl(self, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None): ...
|
||||
def set_xml_acl(
|
||||
self,
|
||||
acl_str,
|
||||
key_name: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
query_args: str = ...,
|
||||
key_name: str = "",
|
||||
headers: dict[str, str] | None = None,
|
||||
version_id: Incomplete | None = None,
|
||||
query_args: str = "acl",
|
||||
): ...
|
||||
def set_acl(
|
||||
self, acl_or_str, key_name: str = ..., headers: dict[str, str] | None = ..., version_id: Incomplete | None = ...
|
||||
self, acl_or_str, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None
|
||||
): ...
|
||||
def get_acl(self, key_name: str = ..., headers: dict[str, str] | None = ..., version_id: Incomplete | None = ...): ...
|
||||
def get_acl(self, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None): ...
|
||||
def set_subresource(
|
||||
self, subresource, value, key_name: str = ..., headers: dict[str, str] | None = ..., version_id: Incomplete | None = ...
|
||||
self, subresource, value, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None
|
||||
): ...
|
||||
def get_subresource(
|
||||
self, subresource, key_name: str = ..., headers: dict[str, str] | None = ..., version_id: Incomplete | None = ...
|
||||
self, subresource, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None
|
||||
): ...
|
||||
def make_public(self, recursive: bool = ..., headers: dict[str, str] | None = ...): ...
|
||||
def add_email_grant(self, permission, email_address, recursive: bool = ..., headers: dict[str, str] | None = ...): ...
|
||||
def make_public(self, recursive: bool = False, headers: dict[str, str] | None = None): ...
|
||||
def add_email_grant(self, permission, email_address, recursive: bool = False, headers: dict[str, str] | None = None): ...
|
||||
def add_user_grant(
|
||||
self,
|
||||
permission,
|
||||
user_id,
|
||||
recursive: bool = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
display_name: Incomplete | None = ...,
|
||||
recursive: bool = False,
|
||||
headers: dict[str, str] | None = None,
|
||||
display_name: Incomplete | None = None,
|
||||
): ...
|
||||
def list_grants(self, headers: dict[str, str] | None = ...): ...
|
||||
def list_grants(self, headers: dict[str, str] | None = None): ...
|
||||
def get_location(self): ...
|
||||
def set_xml_logging(self, logging_str, headers: dict[str, str] | None = ...): ...
|
||||
def set_xml_logging(self, logging_str, headers: dict[str, str] | None = None): ...
|
||||
def enable_logging(
|
||||
self, target_bucket, target_prefix: str = ..., grants: Incomplete | None = ..., headers: dict[str, str] | None = ...
|
||||
self, target_bucket, target_prefix: str = "", grants: Incomplete | None = None, headers: dict[str, str] | None = None
|
||||
): ...
|
||||
def disable_logging(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_logging_status(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_as_logging_target(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_request_payment(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_request_payment(self, payer: str = ..., headers: dict[str, str] | None = ...): ...
|
||||
def disable_logging(self, headers: dict[str, str] | None = None): ...
|
||||
def get_logging_status(self, headers: dict[str, str] | None = None): ...
|
||||
def set_as_logging_target(self, headers: dict[str, str] | None = None): ...
|
||||
def get_request_payment(self, headers: dict[str, str] | None = None): ...
|
||||
def set_request_payment(self, payer: str = "BucketOwner", headers: dict[str, str] | None = None): ...
|
||||
def configure_versioning(
|
||||
self, versioning, mfa_delete: bool = ..., mfa_token: Incomplete | None = ..., headers: dict[str, str] | None = ...
|
||||
self, versioning, mfa_delete: bool = False, mfa_token: Incomplete | None = None, headers: dict[str, str] | None = None
|
||||
): ...
|
||||
def get_versioning_status(self, headers: dict[str, str] | None = ...): ...
|
||||
def configure_lifecycle(self, lifecycle_config, headers: dict[str, str] | None = ...): ...
|
||||
def get_lifecycle_config(self, headers: dict[str, str] | None = ...): ...
|
||||
def delete_lifecycle_configuration(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_versioning_status(self, headers: dict[str, str] | None = None): ...
|
||||
def configure_lifecycle(self, lifecycle_config, headers: dict[str, str] | None = None): ...
|
||||
def get_lifecycle_config(self, headers: dict[str, str] | None = None): ...
|
||||
def delete_lifecycle_configuration(self, headers: dict[str, str] | None = None): ...
|
||||
def configure_website(
|
||||
self,
|
||||
suffix: Incomplete | None = ...,
|
||||
error_key: Incomplete | None = ...,
|
||||
redirect_all_requests_to: Incomplete | None = ...,
|
||||
routing_rules: Incomplete | None = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
suffix: Incomplete | None = None,
|
||||
error_key: Incomplete | None = None,
|
||||
redirect_all_requests_to: Incomplete | None = None,
|
||||
routing_rules: Incomplete | None = None,
|
||||
headers: dict[str, str] | None = None,
|
||||
): ...
|
||||
def set_website_configuration(self, config, headers: dict[str, str] | None = ...): ...
|
||||
def set_website_configuration_xml(self, xml, headers: dict[str, str] | None = ...): ...
|
||||
def get_website_configuration(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_website_configuration_obj(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_website_configuration_with_xml(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_website_configuration_xml(self, headers: dict[str, str] | None = ...): ...
|
||||
def delete_website_configuration(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_website_configuration(self, config, headers: dict[str, str] | None = None): ...
|
||||
def set_website_configuration_xml(self, xml, headers: dict[str, str] | None = None): ...
|
||||
def get_website_configuration(self, headers: dict[str, str] | None = None): ...
|
||||
def get_website_configuration_obj(self, headers: dict[str, str] | None = None): ...
|
||||
def get_website_configuration_with_xml(self, headers: dict[str, str] | None = None): ...
|
||||
def get_website_configuration_xml(self, headers: dict[str, str] | None = None): ...
|
||||
def delete_website_configuration(self, headers: dict[str, str] | None = None): ...
|
||||
def get_website_endpoint(self): ...
|
||||
def get_policy(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_policy(self, policy, headers: dict[str, str] | None = ...): ...
|
||||
def delete_policy(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_cors_xml(self, cors_xml, headers: dict[str, str] | None = ...): ...
|
||||
def set_cors(self, cors_config, headers: dict[str, str] | None = ...): ...
|
||||
def get_cors_xml(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_cors(self, headers: dict[str, str] | None = ...): ...
|
||||
def delete_cors(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_policy(self, headers: dict[str, str] | None = None): ...
|
||||
def set_policy(self, policy, headers: dict[str, str] | None = None): ...
|
||||
def delete_policy(self, headers: dict[str, str] | None = None): ...
|
||||
def set_cors_xml(self, cors_xml, headers: dict[str, str] | None = None): ...
|
||||
def set_cors(self, cors_config, headers: dict[str, str] | None = None): ...
|
||||
def get_cors_xml(self, headers: dict[str, str] | None = None): ...
|
||||
def get_cors(self, headers: dict[str, str] | None = None): ...
|
||||
def delete_cors(self, headers: dict[str, str] | None = None): ...
|
||||
def initiate_multipart_upload(
|
||||
self,
|
||||
key_name,
|
||||
headers: dict[str, str] | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
metadata: Incomplete | None = ...,
|
||||
encrypt_key: bool = ...,
|
||||
policy: Incomplete | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
metadata: Incomplete | None = None,
|
||||
encrypt_key: bool = False,
|
||||
policy: Incomplete | None = None,
|
||||
): ...
|
||||
def complete_multipart_upload(self, key_name, upload_id, xml_body, headers: dict[str, str] | None = ...): ...
|
||||
def cancel_multipart_upload(self, key_name, upload_id, headers: dict[str, str] | None = ...): ...
|
||||
def delete(self, headers: dict[str, str] | None = ...): ...
|
||||
def complete_multipart_upload(self, key_name, upload_id, xml_body, headers: dict[str, str] | None = None): ...
|
||||
def cancel_multipart_upload(self, key_name, upload_id, headers: dict[str, str] | None = None): ...
|
||||
def delete(self, headers: dict[str, str] | None = None): ...
|
||||
def get_tags(self): ...
|
||||
def get_xml_tags(self): ...
|
||||
def set_xml_tags(self, tag_str, headers: dict[str, str] | None = ..., query_args: str = ...): ...
|
||||
def set_tags(self, tags, headers: dict[str, str] | None = ...): ...
|
||||
def delete_tags(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_xml_tags(self, tag_str, headers: dict[str, str] | None = None, query_args: str = "tagging"): ...
|
||||
def set_tags(self, tags, headers: dict[str, str] | None = None): ...
|
||||
def delete_tags(self, headers: dict[str, str] | None = None): ...
|
||||
|
||||
@@ -6,11 +6,11 @@ from .key import Key
|
||||
|
||||
def bucket_lister(
|
||||
bucket,
|
||||
prefix: str = ...,
|
||||
delimiter: str = ...,
|
||||
marker: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
prefix: str = "",
|
||||
delimiter: str = "",
|
||||
marker: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
class BucketListResultSet(Iterable[Key]):
|
||||
@@ -22,23 +22,23 @@ class BucketListResultSet(Iterable[Key]):
|
||||
encoding_type: Any
|
||||
def __init__(
|
||||
self,
|
||||
bucket: Incomplete | None = ...,
|
||||
prefix: str = ...,
|
||||
delimiter: str = ...,
|
||||
marker: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
bucket: Incomplete | None = None,
|
||||
prefix: str = "",
|
||||
delimiter: str = "",
|
||||
marker: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterator[Key]: ...
|
||||
|
||||
def versioned_bucket_lister(
|
||||
bucket,
|
||||
prefix: str = ...,
|
||||
delimiter: str = ...,
|
||||
key_marker: str = ...,
|
||||
version_id_marker: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
prefix: str = "",
|
||||
delimiter: str = "",
|
||||
key_marker: str = "",
|
||||
version_id_marker: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
class VersionedBucketListResultSet:
|
||||
@@ -51,22 +51,22 @@ class VersionedBucketListResultSet:
|
||||
encoding_type: Any
|
||||
def __init__(
|
||||
self,
|
||||
bucket: Incomplete | None = ...,
|
||||
prefix: str = ...,
|
||||
delimiter: str = ...,
|
||||
key_marker: str = ...,
|
||||
version_id_marker: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
bucket: Incomplete | None = None,
|
||||
prefix: str = "",
|
||||
delimiter: str = "",
|
||||
key_marker: str = "",
|
||||
version_id_marker: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterator[Key]: ...
|
||||
|
||||
def multipart_upload_lister(
|
||||
bucket,
|
||||
key_marker: str = ...,
|
||||
upload_id_marker: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
key_marker: str = "",
|
||||
upload_id_marker: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
class MultiPartUploadListResultSet:
|
||||
@@ -77,10 +77,10 @@ class MultiPartUploadListResultSet:
|
||||
encoding_type: Any
|
||||
def __init__(
|
||||
self,
|
||||
bucket: Incomplete | None = ...,
|
||||
key_marker: str = ...,
|
||||
upload_id_marker: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
bucket: Incomplete | None = None,
|
||||
key_marker: str = "",
|
||||
upload_id_marker: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def __iter__(self): ...
|
||||
|
||||
@@ -6,7 +6,7 @@ class BucketLogging:
|
||||
prefix: Any
|
||||
grants: Any
|
||||
def __init__(
|
||||
self, target: Incomplete | None = ..., prefix: Incomplete | None = ..., grants: Incomplete | None = ...
|
||||
self, target: Incomplete | None = None, prefix: Incomplete | None = None, grants: Incomplete | None = None
|
||||
) -> None: ...
|
||||
def add_grant(self, grant): ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
|
||||
@@ -11,10 +11,10 @@ def assert_case_insensitive(f): ...
|
||||
|
||||
class _CallingFormat:
|
||||
def get_bucket_server(self, server, bucket): ...
|
||||
def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ...
|
||||
def build_url_base(self, connection, protocol, server, bucket, key: str = ""): ...
|
||||
def build_host(self, server, bucket): ...
|
||||
def build_auth_path(self, bucket, key: str = ...): ...
|
||||
def build_path_base(self, bucket, key: str = ...): ...
|
||||
def build_auth_path(self, bucket, key: str = ""): ...
|
||||
def build_path_base(self, bucket, key: str = ""): ...
|
||||
|
||||
class SubdomainCallingFormat(_CallingFormat):
|
||||
def get_bucket_server(self, server, bucket): ...
|
||||
@@ -24,10 +24,10 @@ class VHostCallingFormat(_CallingFormat):
|
||||
|
||||
class OrdinaryCallingFormat(_CallingFormat):
|
||||
def get_bucket_server(self, server, bucket): ...
|
||||
def build_path_base(self, bucket, key: str = ...): ...
|
||||
def build_path_base(self, bucket, key: str = ""): ...
|
||||
|
||||
class ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat):
|
||||
def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ...
|
||||
def build_url_base(self, connection, protocol, server, bucket, key: str = ""): ...
|
||||
|
||||
class Location:
|
||||
DEFAULT: str
|
||||
@@ -53,26 +53,26 @@ class S3Connection(AWSAuthConnection):
|
||||
anon: Any
|
||||
def __init__(
|
||||
self,
|
||||
aws_access_key_id: Incomplete | None = ...,
|
||||
aws_secret_access_key: Incomplete | None = ...,
|
||||
is_secure: bool = ...,
|
||||
port: Incomplete | None = ...,
|
||||
proxy: Incomplete | None = ...,
|
||||
proxy_port: Incomplete | None = ...,
|
||||
proxy_user: Incomplete | None = ...,
|
||||
proxy_pass: Incomplete | None = ...,
|
||||
aws_access_key_id: Incomplete | None = None,
|
||||
aws_secret_access_key: Incomplete | None = None,
|
||||
is_secure: bool = True,
|
||||
port: Incomplete | None = None,
|
||||
proxy: Incomplete | None = None,
|
||||
proxy_port: Incomplete | None = None,
|
||||
proxy_user: Incomplete | None = None,
|
||||
proxy_pass: Incomplete | None = None,
|
||||
host: Any = ...,
|
||||
debug: int = ...,
|
||||
https_connection_factory: Incomplete | None = ...,
|
||||
calling_format: Any = ...,
|
||||
path: str = ...,
|
||||
provider: str = ...,
|
||||
debug: int = 0,
|
||||
https_connection_factory: Incomplete | None = None,
|
||||
calling_format: Any = "boto.s3.connection.SubdomainCallingFormat",
|
||||
path: str = "/",
|
||||
provider: str = "aws",
|
||||
bucket_class: type[Bucket] = ...,
|
||||
security_token: Incomplete | None = ...,
|
||||
suppress_consec_slashes: bool = ...,
|
||||
anon: bool = ...,
|
||||
validate_certs: Incomplete | None = ...,
|
||||
profile_name: Incomplete | None = ...,
|
||||
security_token: Incomplete | None = None,
|
||||
suppress_consec_slashes: bool = True,
|
||||
anon: bool = False,
|
||||
validate_certs: Incomplete | None = None,
|
||||
profile_name: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def __contains__(self, bucket_name): ...
|
||||
@@ -82,61 +82,61 @@ class S3Connection(AWSAuthConnection):
|
||||
self,
|
||||
bucket_name,
|
||||
key,
|
||||
expires_in: int = ...,
|
||||
acl: Incomplete | None = ...,
|
||||
success_action_redirect: Incomplete | None = ...,
|
||||
max_content_length: Incomplete | None = ...,
|
||||
http_method: str = ...,
|
||||
fields: Incomplete | None = ...,
|
||||
conditions: Incomplete | None = ...,
|
||||
storage_class: str = ...,
|
||||
server_side_encryption: Incomplete | None = ...,
|
||||
expires_in: int = 6000,
|
||||
acl: Incomplete | None = None,
|
||||
success_action_redirect: Incomplete | None = None,
|
||||
max_content_length: Incomplete | None = None,
|
||||
http_method: str = "http",
|
||||
fields: Incomplete | None = None,
|
||||
conditions: Incomplete | None = None,
|
||||
storage_class: str = "STANDARD",
|
||||
server_side_encryption: Incomplete | None = None,
|
||||
): ...
|
||||
def generate_url_sigv4(
|
||||
self,
|
||||
expires_in,
|
||||
method,
|
||||
bucket: str = ...,
|
||||
key: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
force_http: bool = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
iso_date: Incomplete | None = ...,
|
||||
bucket: str = "",
|
||||
key: str = "",
|
||||
headers: dict[str, str] | None = None,
|
||||
force_http: bool = False,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
version_id: Incomplete | None = None,
|
||||
iso_date: Incomplete | None = None,
|
||||
): ...
|
||||
def generate_url(
|
||||
self,
|
||||
expires_in,
|
||||
method,
|
||||
bucket: str = ...,
|
||||
key: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
query_auth: bool = ...,
|
||||
force_http: bool = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
expires_in_absolute: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
bucket: str = "",
|
||||
key: str = "",
|
||||
headers: dict[str, str] | None = None,
|
||||
query_auth: bool = True,
|
||||
force_http: bool = False,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
expires_in_absolute: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
): ...
|
||||
def get_all_buckets(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_canonical_user_id(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_bucket(self, bucket_name: str, validate: bool = ..., headers: dict[str, str] | None = ...) -> Bucket: ...
|
||||
def head_bucket(self, bucket_name, headers: dict[str, str] | None = ...): ...
|
||||
def lookup(self, bucket_name, validate: bool = ..., headers: dict[str, str] | None = ...): ...
|
||||
def get_all_buckets(self, headers: dict[str, str] | None = None): ...
|
||||
def get_canonical_user_id(self, headers: dict[str, str] | None = None): ...
|
||||
def get_bucket(self, bucket_name: str, validate: bool = True, headers: dict[str, str] | None = None) -> Bucket: ...
|
||||
def head_bucket(self, bucket_name, headers: dict[str, str] | None = None): ...
|
||||
def lookup(self, bucket_name, validate: bool = True, headers: dict[str, str] | None = None): ...
|
||||
def create_bucket(
|
||||
self, bucket_name, headers: dict[str, str] | None = ..., location: Any = ..., policy: Incomplete | None = ...
|
||||
self, bucket_name, headers: dict[str, str] | None = None, location: Any = "", policy: Incomplete | None = None
|
||||
): ...
|
||||
def delete_bucket(self, bucket, headers: dict[str, str] | None = ...): ...
|
||||
def delete_bucket(self, bucket, headers: dict[str, str] | None = None): ...
|
||||
def make_request( # type: ignore[override]
|
||||
self,
|
||||
method,
|
||||
bucket: str = ...,
|
||||
key: str = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
data: str = ...,
|
||||
query_args: Incomplete | None = ...,
|
||||
sender: Incomplete | None = ...,
|
||||
override_num_retries: Incomplete | None = ...,
|
||||
retry_handler: Incomplete | None = ...,
|
||||
bucket: str = "",
|
||||
key: str = "",
|
||||
headers: Incomplete | None = None,
|
||||
data: str = "",
|
||||
query_args: Incomplete | None = None,
|
||||
sender: Incomplete | None = None,
|
||||
override_num_retries: Incomplete | None = None,
|
||||
retry_handler: Incomplete | None = None,
|
||||
*args,
|
||||
**kwargs,
|
||||
): ...
|
||||
|
||||
@@ -10,12 +10,12 @@ class CORSRule:
|
||||
expose_header: Any
|
||||
def __init__(
|
||||
self,
|
||||
allowed_method: Incomplete | None = ...,
|
||||
allowed_origin: Incomplete | None = ...,
|
||||
id: Incomplete | None = ...,
|
||||
allowed_header: Incomplete | None = ...,
|
||||
max_age_seconds: Incomplete | None = ...,
|
||||
expose_header: Incomplete | None = ...,
|
||||
allowed_method: Incomplete | None = None,
|
||||
allowed_origin: Incomplete | None = None,
|
||||
id: Incomplete | None = None,
|
||||
allowed_header: Incomplete | None = None,
|
||||
max_age_seconds: Incomplete | None = None,
|
||||
expose_header: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
@@ -29,8 +29,8 @@ class CORSConfiguration(list[CORSRule]):
|
||||
self,
|
||||
allowed_method,
|
||||
allowed_origin,
|
||||
id: Incomplete | None = ...,
|
||||
allowed_header: Incomplete | None = ...,
|
||||
max_age_seconds: Incomplete | None = ...,
|
||||
expose_header: Incomplete | None = ...,
|
||||
id: Incomplete | None = None,
|
||||
allowed_header: Incomplete | None = None,
|
||||
max_age_seconds: Incomplete | None = None,
|
||||
expose_header: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
@@ -8,6 +8,6 @@ class DeleteMarker:
|
||||
is_latest: bool
|
||||
last_modified: Any
|
||||
owner: Any
|
||||
def __init__(self, bucket: Incomplete | None = ..., name: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None, name: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -32,7 +32,7 @@ class Key:
|
||||
ongoing_restore: Any
|
||||
expiry_date: Any
|
||||
local_hashes: Any
|
||||
def __init__(self, bucket: Incomplete | None = ..., name: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None, name: Incomplete | None = None) -> None: ...
|
||||
def __iter__(self): ...
|
||||
@property
|
||||
def provider(self): ...
|
||||
@@ -42,194 +42,194 @@ class Key:
|
||||
storage_class: Any
|
||||
def get_md5_from_hexdigest(self, md5_hexdigest): ...
|
||||
def handle_encryption_headers(self, resp): ...
|
||||
def handle_version_headers(self, resp, force: bool = ...): ...
|
||||
def handle_version_headers(self, resp, force: bool = False): ...
|
||||
def handle_restore_headers(self, response): ...
|
||||
def handle_addl_headers(self, headers): ...
|
||||
def open_read(
|
||||
self,
|
||||
headers: dict[str, str] | None = ...,
|
||||
query_args: str = ...,
|
||||
override_num_retries: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
query_args: str = "",
|
||||
override_num_retries: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
): ...
|
||||
def open_write(self, headers: dict[str, str] | None = ..., override_num_retries: Incomplete | None = ...): ...
|
||||
def open_write(self, headers: dict[str, str] | None = None, override_num_retries: Incomplete | None = None): ...
|
||||
def open(
|
||||
self,
|
||||
mode: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
query_args: Incomplete | None = ...,
|
||||
override_num_retries: Incomplete | None = ...,
|
||||
mode: str = "r",
|
||||
headers: dict[str, str] | None = None,
|
||||
query_args: Incomplete | None = None,
|
||||
override_num_retries: Incomplete | None = None,
|
||||
): ...
|
||||
closed: bool
|
||||
def close(self, fast: bool = ...): ...
|
||||
def close(self, fast: bool = False): ...
|
||||
def next(self): ...
|
||||
__next__: Any
|
||||
def read(self, size: int = ...): ...
|
||||
def change_storage_class(self, new_storage_class, dst_bucket: Incomplete | None = ..., validate_dst_bucket: bool = ...): ...
|
||||
def read(self, size: int = 0): ...
|
||||
def change_storage_class(self, new_storage_class, dst_bucket: Incomplete | None = None, validate_dst_bucket: bool = True): ...
|
||||
def copy(
|
||||
self,
|
||||
dst_bucket,
|
||||
dst_key,
|
||||
metadata: Incomplete | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
preserve_acl: bool = ...,
|
||||
encrypt_key: bool = ...,
|
||||
validate_dst_bucket: bool = ...,
|
||||
metadata: Incomplete | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
preserve_acl: bool = False,
|
||||
encrypt_key: bool = False,
|
||||
validate_dst_bucket: bool = True,
|
||||
): ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def exists(self, headers: dict[str, str] | None = ...): ...
|
||||
def delete(self, headers: dict[str, str] | None = ...): ...
|
||||
def exists(self, headers: dict[str, str] | None = None): ...
|
||||
def delete(self, headers: dict[str, str] | None = None): ...
|
||||
def get_metadata(self, name): ...
|
||||
def set_metadata(self, name, value): ...
|
||||
def update_metadata(self, d): ...
|
||||
def set_acl(self, acl_str, headers: dict[str, str] | None = ...): ...
|
||||
def get_acl(self, headers: dict[str, str] | None = ...): ...
|
||||
def get_xml_acl(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_xml_acl(self, acl_str, headers: dict[str, str] | None = ...): ...
|
||||
def set_canned_acl(self, acl_str, headers: dict[str, str] | None = ...): ...
|
||||
def set_acl(self, acl_str, headers: dict[str, str] | None = None): ...
|
||||
def get_acl(self, headers: dict[str, str] | None = None): ...
|
||||
def get_xml_acl(self, headers: dict[str, str] | None = None): ...
|
||||
def set_xml_acl(self, acl_str, headers: dict[str, str] | None = None): ...
|
||||
def set_canned_acl(self, acl_str, headers: dict[str, str] | None = None): ...
|
||||
def get_redirect(self): ...
|
||||
def set_redirect(self, redirect_location, headers: dict[str, str] | None = ...): ...
|
||||
def make_public(self, headers: dict[str, str] | None = ...): ...
|
||||
def set_redirect(self, redirect_location, headers: dict[str, str] | None = None): ...
|
||||
def make_public(self, headers: dict[str, str] | None = None): ...
|
||||
def generate_url(
|
||||
self,
|
||||
expires_in,
|
||||
method: str = ...,
|
||||
headers: dict[str, str] | None = ...,
|
||||
query_auth: bool = ...,
|
||||
force_http: bool = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
expires_in_absolute: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
policy: Incomplete | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
encrypt_key: bool = ...,
|
||||
method: str = "GET",
|
||||
headers: dict[str, str] | None = None,
|
||||
query_auth: bool = True,
|
||||
force_http: bool = False,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
expires_in_absolute: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
policy: Incomplete | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
encrypt_key: bool = False,
|
||||
): ...
|
||||
def send_file(
|
||||
self,
|
||||
fp,
|
||||
headers: dict[str, str] | None = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
query_args: Incomplete | None = ...,
|
||||
chunked_transfer: bool = ...,
|
||||
size: Incomplete | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
query_args: Incomplete | None = None,
|
||||
chunked_transfer: bool = False,
|
||||
size: Incomplete | None = None,
|
||||
): ...
|
||||
def should_retry(self, response, chunked_transfer: bool = ...): ...
|
||||
def compute_md5(self, fp, size: Incomplete | None = ...): ...
|
||||
def should_retry(self, response, chunked_transfer: bool = False): ...
|
||||
def compute_md5(self, fp, size: Incomplete | None = None): ...
|
||||
def set_contents_from_stream(
|
||||
self,
|
||||
fp,
|
||||
headers: dict[str, str] | None = ...,
|
||||
replace: bool = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
policy: Incomplete | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
query_args: Incomplete | None = ...,
|
||||
size: Incomplete | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
replace: bool = True,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
policy: Incomplete | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
query_args: Incomplete | None = None,
|
||||
size: Incomplete | None = None,
|
||||
): ...
|
||||
def set_contents_from_file(
|
||||
self,
|
||||
fp,
|
||||
headers: dict[str, str] | None = ...,
|
||||
replace: bool = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
policy: Incomplete | None = ...,
|
||||
md5: Incomplete | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
query_args: Incomplete | None = ...,
|
||||
encrypt_key: bool = ...,
|
||||
size: Incomplete | None = ...,
|
||||
rewind: bool = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
replace: bool = True,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
policy: Incomplete | None = None,
|
||||
md5: Incomplete | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
query_args: Incomplete | None = None,
|
||||
encrypt_key: bool = False,
|
||||
size: Incomplete | None = None,
|
||||
rewind: bool = False,
|
||||
): ...
|
||||
def set_contents_from_filename(
|
||||
self,
|
||||
filename,
|
||||
headers: dict[str, str] | None = ...,
|
||||
replace: bool = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
policy: Incomplete | None = ...,
|
||||
md5: Incomplete | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
encrypt_key: bool = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
replace: bool = True,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
policy: Incomplete | None = None,
|
||||
md5: Incomplete | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
encrypt_key: bool = False,
|
||||
): ...
|
||||
def set_contents_from_string(
|
||||
self,
|
||||
string_data: str | bytes,
|
||||
headers: dict[str, str] | None = ...,
|
||||
replace: bool = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
policy: Incomplete | None = ...,
|
||||
md5: Incomplete | None = ...,
|
||||
reduced_redundancy: bool = ...,
|
||||
encrypt_key: bool = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
replace: bool = True,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
policy: Incomplete | None = None,
|
||||
md5: Incomplete | None = None,
|
||||
reduced_redundancy: bool = False,
|
||||
encrypt_key: bool = False,
|
||||
) -> None: ...
|
||||
def get_file(
|
||||
self,
|
||||
fp,
|
||||
headers: dict[str, str] | None = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
torrent: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
override_num_retries: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
torrent: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
override_num_retries: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
): ...
|
||||
def get_torrent_file(
|
||||
self, fp, headers: dict[str, str] | None = ..., cb: Callable[[int, int], object] | None = ..., num_cb: int = ...
|
||||
self, fp, headers: dict[str, str] | None = None, cb: Callable[[int, int], object] | None = None, num_cb: int = 10
|
||||
): ...
|
||||
def get_contents_to_file(
|
||||
self,
|
||||
fp,
|
||||
headers: dict[str, str] | None = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
torrent: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
res_download_handler: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
torrent: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
res_download_handler: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
): ...
|
||||
def get_contents_to_filename(
|
||||
self,
|
||||
filename,
|
||||
headers: dict[str, str] | None = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
torrent: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
res_download_handler: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
torrent: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
res_download_handler: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
): ...
|
||||
@overload
|
||||
def get_contents_as_string(
|
||||
self,
|
||||
headers: dict[str, str] | None = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
torrent: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
encoding: None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
torrent: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
encoding: None = None,
|
||||
) -> bytes: ...
|
||||
@overload
|
||||
def get_contents_as_string(
|
||||
self,
|
||||
headers: dict[str, str] | None = ...,
|
||||
cb: Callable[[int, int], object] | None = ...,
|
||||
num_cb: int = ...,
|
||||
torrent: bool = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
response_headers: dict[str, str] | None = ...,
|
||||
headers: dict[str, str] | None = None,
|
||||
cb: Callable[[int, int], object] | None = None,
|
||||
num_cb: int = 10,
|
||||
torrent: bool = False,
|
||||
version_id: Incomplete | None = None,
|
||||
response_headers: dict[str, str] | None = None,
|
||||
*,
|
||||
encoding: str,
|
||||
) -> str: ...
|
||||
def add_email_grant(self, permission, email_address, headers: dict[str, str] | None = ...): ...
|
||||
def add_email_grant(self, permission, email_address, headers: dict[str, str] | None = None): ...
|
||||
def add_user_grant(
|
||||
self, permission, user_id, headers: dict[str, str] | None = ..., display_name: Incomplete | None = ...
|
||||
self, permission, user_id, headers: dict[str, str] | None = None, display_name: Incomplete | None = None
|
||||
): ...
|
||||
def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: dict[str, str] | None = ...): ...
|
||||
def restore(self, days, headers: dict[str, str] | None = ...): ...
|
||||
def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: dict[str, str] | None = None): ...
|
||||
def restore(self, days, headers: dict[str, str] | None = None): ...
|
||||
|
||||
@@ -12,7 +12,7 @@ class KeyFile:
|
||||
name: Any
|
||||
def __init__(self, key) -> None: ...
|
||||
def tell(self): ...
|
||||
def seek(self, pos, whence: Any = ...): ...
|
||||
def seek(self, pos, whence: Any = 0): ...
|
||||
def read(self, size): ...
|
||||
def close(self): ...
|
||||
def isatty(self): ...
|
||||
|
||||
@@ -9,11 +9,11 @@ class Rule:
|
||||
transition: Any
|
||||
def __init__(
|
||||
self,
|
||||
id: Incomplete | None = ...,
|
||||
prefix: Incomplete | None = ...,
|
||||
status: Incomplete | None = ...,
|
||||
expiration: Incomplete | None = ...,
|
||||
transition: Incomplete | None = ...,
|
||||
id: Incomplete | None = None,
|
||||
prefix: Incomplete | None = None,
|
||||
status: Incomplete | None = None,
|
||||
expiration: Incomplete | None = None,
|
||||
transition: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
@@ -22,7 +22,7 @@ class Rule:
|
||||
class Expiration:
|
||||
days: Any
|
||||
date: Any
|
||||
def __init__(self, days: Incomplete | None = ..., date: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, days: Incomplete | None = None, date: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
@@ -32,7 +32,7 @@ class Transition:
|
||||
date: Any
|
||||
storage_class: Any
|
||||
def __init__(
|
||||
self, days: Incomplete | None = ..., date: Incomplete | None = ..., storage_class: Incomplete | None = ...
|
||||
self, days: Incomplete | None = None, date: Incomplete | None = None, storage_class: Incomplete | None = None
|
||||
) -> None: ...
|
||||
def to_xml(self): ...
|
||||
|
||||
@@ -47,7 +47,7 @@ class Transitions(list[Transition]):
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
def add_transition(
|
||||
self, days: Incomplete | None = ..., date: Incomplete | None = ..., storage_class: Incomplete | None = ...
|
||||
self, days: Incomplete | None = None, date: Incomplete | None = None, storage_class: Incomplete | None = None
|
||||
): ...
|
||||
@property
|
||||
def days(self): ...
|
||||
@@ -62,9 +62,9 @@ class Lifecycle(list[Rule]):
|
||||
def to_xml(self): ...
|
||||
def add_rule(
|
||||
self,
|
||||
id: Incomplete | None = ...,
|
||||
prefix: str = ...,
|
||||
status: str = ...,
|
||||
expiration: Incomplete | None = ...,
|
||||
transition: Incomplete | None = ...,
|
||||
id: Incomplete | None = None,
|
||||
prefix: str = "",
|
||||
status: str = "Enabled",
|
||||
expiration: Incomplete | None = None,
|
||||
transition: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
@@ -8,10 +8,10 @@ class Deleted:
|
||||
delete_marker_version_id: Any
|
||||
def __init__(
|
||||
self,
|
||||
key: Incomplete | None = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
delete_marker: bool = ...,
|
||||
delete_marker_version_id: Incomplete | None = ...,
|
||||
key: Incomplete | None = None,
|
||||
version_id: Incomplete | None = None,
|
||||
delete_marker: bool = False,
|
||||
delete_marker_version_id: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
@@ -23,10 +23,10 @@ class Error:
|
||||
message: Any
|
||||
def __init__(
|
||||
self,
|
||||
key: Incomplete | None = ...,
|
||||
version_id: Incomplete | None = ...,
|
||||
code: Incomplete | None = ...,
|
||||
message: Incomplete | None = ...,
|
||||
key: Incomplete | None = None,
|
||||
version_id: Incomplete | None = None,
|
||||
code: Incomplete | None = None,
|
||||
message: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
@@ -35,6 +35,6 @@ class MultiDeleteResult:
|
||||
bucket: Any
|
||||
deleted: Any
|
||||
errors: Any
|
||||
def __init__(self, bucket: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -9,7 +9,7 @@ class CompleteMultiPartUpload:
|
||||
etag: Any
|
||||
version_id: Any
|
||||
encrypted: Any
|
||||
def __init__(self, bucket: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -19,11 +19,11 @@ class Part:
|
||||
last_modified: Any
|
||||
etag: Any
|
||||
size: Any
|
||||
def __init__(self, bucket: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
def part_lister(mpupload, part_number_marker: Incomplete | None = ...): ...
|
||||
def part_lister(mpupload, part_number_marker: Incomplete | None = None): ...
|
||||
|
||||
class MultiPartUpload:
|
||||
bucket: Any
|
||||
@@ -38,37 +38,37 @@ class MultiPartUpload:
|
||||
next_part_number_marker: Any
|
||||
max_parts: Any
|
||||
is_truncated: bool
|
||||
def __init__(self, bucket: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def to_xml(self): ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def get_all_parts(
|
||||
self,
|
||||
max_parts: Incomplete | None = ...,
|
||||
part_number_marker: Incomplete | None = ...,
|
||||
encoding_type: Incomplete | None = ...,
|
||||
max_parts: Incomplete | None = None,
|
||||
part_number_marker: Incomplete | None = None,
|
||||
encoding_type: Incomplete | None = None,
|
||||
): ...
|
||||
def upload_part_from_file(
|
||||
self,
|
||||
fp,
|
||||
part_num,
|
||||
headers: Incomplete | None = ...,
|
||||
replace: bool = ...,
|
||||
cb: Incomplete | None = ...,
|
||||
num_cb: int = ...,
|
||||
md5: Incomplete | None = ...,
|
||||
size: Incomplete | None = ...,
|
||||
headers: Incomplete | None = None,
|
||||
replace: bool = True,
|
||||
cb: Incomplete | None = None,
|
||||
num_cb: int = 10,
|
||||
md5: Incomplete | None = None,
|
||||
size: Incomplete | None = None,
|
||||
): ...
|
||||
def copy_part_from_key(
|
||||
self,
|
||||
src_bucket_name,
|
||||
src_key_name,
|
||||
part_num,
|
||||
start: Incomplete | None = ...,
|
||||
end: Incomplete | None = ...,
|
||||
src_version_id: Incomplete | None = ...,
|
||||
headers: Incomplete | None = ...,
|
||||
start: Incomplete | None = None,
|
||||
end: Incomplete | None = None,
|
||||
src_version_id: Incomplete | None = None,
|
||||
headers: Incomplete | None = None,
|
||||
): ...
|
||||
def complete_upload(self): ...
|
||||
def cancel_upload(self): ...
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Any
|
||||
class Prefix:
|
||||
bucket: Any
|
||||
name: Any
|
||||
def __init__(self, bucket: Incomplete | None = ..., name: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, bucket: Incomplete | None = None, name: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
@property
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Any
|
||||
class Tag:
|
||||
key: Any
|
||||
value: Any
|
||||
def __init__(self, key: Incomplete | None = ..., value: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, key: Incomplete | None = None, value: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
|
||||
@@ -5,7 +5,7 @@ class User:
|
||||
type: Any
|
||||
id: Any
|
||||
display_name: Any
|
||||
def __init__(self, parent: Incomplete | None = ..., id: str = ..., display_name: str = ...) -> None: ...
|
||||
def __init__(self, parent: Incomplete | None = None, id: str = "", display_name: str = "") -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self, element_name: str = ...): ...
|
||||
def to_xml(self, element_name: str = "Owner"): ...
|
||||
|
||||
@@ -10,10 +10,10 @@ class WebsiteConfiguration:
|
||||
routing_rules: Any
|
||||
def __init__(
|
||||
self,
|
||||
suffix: Incomplete | None = ...,
|
||||
error_key: Incomplete | None = ...,
|
||||
redirect_all_requests_to: Incomplete | None = ...,
|
||||
routing_rules: Incomplete | None = ...,
|
||||
suffix: Incomplete | None = None,
|
||||
error_key: Incomplete | None = None,
|
||||
redirect_all_requests_to: Incomplete | None = None,
|
||||
routing_rules: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
@@ -22,7 +22,7 @@ class WebsiteConfiguration:
|
||||
class _XMLKeyValue:
|
||||
translator: Any
|
||||
container: Any
|
||||
def __init__(self, translator, container: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, translator, container: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
@@ -31,7 +31,7 @@ class RedirectLocation(_XMLKeyValue):
|
||||
TRANSLATOR: Any
|
||||
hostname: Any
|
||||
protocol: Any
|
||||
def __init__(self, hostname: Incomplete | None = ..., protocol: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, hostname: Incomplete | None = None, protocol: Incomplete | None = None) -> None: ...
|
||||
def to_xml(self): ...
|
||||
|
||||
class RoutingRules(list[RoutingRule]):
|
||||
@@ -43,26 +43,26 @@ class RoutingRules(list[RoutingRule]):
|
||||
class RoutingRule:
|
||||
condition: Any
|
||||
redirect: Any
|
||||
def __init__(self, condition: Incomplete | None = ..., redirect: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, condition: Incomplete | None = None, redirect: Incomplete | None = None) -> None: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
@classmethod
|
||||
def when(cls, key_prefix: Incomplete | None = ..., http_error_code: Incomplete | None = ...): ...
|
||||
def when(cls, key_prefix: Incomplete | None = None, http_error_code: Incomplete | None = None): ...
|
||||
def then_redirect(
|
||||
self,
|
||||
hostname: Incomplete | None = ...,
|
||||
protocol: Incomplete | None = ...,
|
||||
replace_key: Incomplete | None = ...,
|
||||
replace_key_prefix: Incomplete | None = ...,
|
||||
http_redirect_code: Incomplete | None = ...,
|
||||
hostname: Incomplete | None = None,
|
||||
protocol: Incomplete | None = None,
|
||||
replace_key: Incomplete | None = None,
|
||||
replace_key_prefix: Incomplete | None = None,
|
||||
http_redirect_code: Incomplete | None = None,
|
||||
): ...
|
||||
|
||||
class Condition(_XMLKeyValue):
|
||||
TRANSLATOR: Any
|
||||
key_prefix: Any
|
||||
http_error_code: Any
|
||||
def __init__(self, key_prefix: Incomplete | None = ..., http_error_code: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, key_prefix: Incomplete | None = None, http_error_code: Incomplete | None = None) -> None: ...
|
||||
def to_xml(self): ...
|
||||
|
||||
class Redirect(_XMLKeyValue):
|
||||
@@ -74,10 +74,10 @@ class Redirect(_XMLKeyValue):
|
||||
http_redirect_code: Any
|
||||
def __init__(
|
||||
self,
|
||||
hostname: Incomplete | None = ...,
|
||||
protocol: Incomplete | None = ...,
|
||||
replace_key: Incomplete | None = ...,
|
||||
replace_key_prefix: Incomplete | None = ...,
|
||||
http_redirect_code: Incomplete | None = ...,
|
||||
hostname: Incomplete | None = None,
|
||||
protocol: Incomplete | None = None,
|
||||
replace_key: Incomplete | None = None,
|
||||
replace_key_prefix: Incomplete | None = None,
|
||||
http_redirect_code: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def to_xml(self): ...
|
||||
|
||||
@@ -24,25 +24,33 @@ qsa_of_interest: list[str]
|
||||
|
||||
def unquote_v(nv: str) -> str | tuple[str, str]: ...
|
||||
def canonical_string(
|
||||
method: str, path: str, headers: Mapping[str, str | None], expires: int | None = ..., provider: _Provider | None = ...
|
||||
method: str, path: str, headers: Mapping[str, str | None], expires: int | None = None, provider: _Provider | None = None
|
||||
) -> str: ...
|
||||
def merge_meta(
|
||||
headers: Mapping[str, str], metadata: Mapping[str, str], provider: _Provider | None = ...
|
||||
headers: Mapping[str, str], metadata: Mapping[str, str], provider: _Provider | None = None
|
||||
) -> Mapping[str, str]: ...
|
||||
def get_aws_metadata(headers: Mapping[str, str], provider: _Provider | None = ...) -> Mapping[str, str]: ...
|
||||
def retry_url(url: str, retry_on_404: bool = ..., num_retries: int = ..., timeout: int | None = ...) -> str: ...
|
||||
def get_aws_metadata(headers: Mapping[str, str], provider: _Provider | None = None) -> Mapping[str, str]: ...
|
||||
def retry_url(url: str, retry_on_404: bool = True, num_retries: int = 10, timeout: int | None = None) -> str: ...
|
||||
|
||||
class LazyLoadMetadata(dict[_KT, _VT]):
|
||||
def __init__(self, url: str, num_retries: int, timeout: int | None = ...) -> None: ...
|
||||
def __init__(self, url: str, num_retries: int, timeout: int | None = None) -> None: ...
|
||||
|
||||
def get_instance_metadata(
|
||||
version: str = ..., url: str = ..., data: str = ..., timeout: int | None = ..., num_retries: int = ...
|
||||
version: str = "latest",
|
||||
url: str = "http://169.254.169.254",
|
||||
data: str = "meta-data/",
|
||||
timeout: int | None = None,
|
||||
num_retries: int = 5,
|
||||
) -> LazyLoadMetadata[Any, Any] | None: ...
|
||||
def get_instance_identity(
|
||||
version: str = ..., url: str = ..., timeout: int | None = ..., num_retries: int = ...
|
||||
version: str = "latest", url: str = "http://169.254.169.254", timeout: int | None = None, num_retries: int = 5
|
||||
) -> Mapping[str, Any] | None: ...
|
||||
def get_instance_userdata(
|
||||
version: str = ..., sep: str | None = ..., url: str = ..., timeout: int | None = ..., num_retries: int = ...
|
||||
version: str = "latest",
|
||||
sep: str | None = None,
|
||||
url: str = "http://169.254.169.254",
|
||||
timeout: int | None = None,
|
||||
num_retries: int = 5,
|
||||
) -> Mapping[str, str]: ...
|
||||
|
||||
ISO8601: str
|
||||
@@ -51,12 +59,12 @@ RFC1123: str
|
||||
LOCALE_LOCK: _LockType
|
||||
|
||||
def setlocale(name: str | tuple[str, str]) -> AbstractContextManager[str]: ...
|
||||
def get_ts(ts: time.struct_time | None = ...) -> str: ...
|
||||
def get_ts(ts: time.struct_time | None = None) -> str: ...
|
||||
def parse_ts(ts: str) -> datetime.datetime: ...
|
||||
def find_class(module_name: str, class_name: str | None = ...) -> type[Any] | None: ...
|
||||
def find_class(module_name: str, class_name: str | None = None) -> type[Any] | None: ...
|
||||
def update_dme(username: str, password: str, dme_id: str, ip_address: str) -> str: ...
|
||||
def fetch_file(
|
||||
uri: str, file: IO[str] | None = ..., username: str | None = ..., password: str | None = ...
|
||||
uri: str, file: IO[str] | None = None, username: str | None = None, password: str | None = None
|
||||
) -> IO[str] | None: ...
|
||||
|
||||
class ShellCommand:
|
||||
@@ -66,10 +74,10 @@ class ShellCommand:
|
||||
wait: bool
|
||||
fail_fast: bool
|
||||
def __init__(
|
||||
self, command: subprocess._CMD, wait: bool = ..., fail_fast: bool = ..., cwd: StrOrBytesPath | None = ...
|
||||
self, command: subprocess._CMD, wait: bool = True, fail_fast: bool = False, cwd: StrOrBytesPath | None = None
|
||||
) -> None: ...
|
||||
process: subprocess.Popen[Any]
|
||||
def run(self, cwd: subprocess._CMD | None = ...) -> int | None: ...
|
||||
def run(self, cwd: subprocess._CMD | None = None) -> int | None: ...
|
||||
def setReadOnly(self, value) -> None: ...
|
||||
def getStatus(self) -> int | None: ...
|
||||
status: int | None
|
||||
@@ -102,34 +110,36 @@ _Str: TypeAlias = str
|
||||
class Password:
|
||||
hashfunc: Callable[[bytes], _Hash]
|
||||
str: _Str | None
|
||||
def __init__(self, str: _Str | None = ..., hashfunc: Callable[[bytes], _Hash] | None = ...) -> None: ...
|
||||
def __init__(self, str: _Str | None = None, hashfunc: Callable[[bytes], _Hash] | None = None) -> None: ...
|
||||
def set(self, value: bytes | _Str) -> None: ...
|
||||
def __eq__(self, other: _Str | bytes | None) -> bool: ... # type: ignore[override]
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
def notify(
|
||||
subject: str,
|
||||
body: str | None = ...,
|
||||
html_body: Sequence[str] | str | None = ...,
|
||||
to_string: str | None = ...,
|
||||
attachments: Iterable[Message] | None = ...,
|
||||
append_instance_id: bool = ...,
|
||||
body: str | None = None,
|
||||
html_body: Sequence[str] | str | None = None,
|
||||
to_string: str | None = None,
|
||||
attachments: Iterable[Message] | None = None,
|
||||
append_instance_id: bool = True,
|
||||
) -> None: ...
|
||||
def get_utf8_value(value: str) -> bytes: ...
|
||||
def mklist(value: Any) -> list[Any]: ...
|
||||
def pythonize_name(name: str) -> str: ...
|
||||
def write_mime_multipart(
|
||||
content: list[tuple[str, str]], compress: bool = ..., deftype: str = ..., delimiter: str = ...
|
||||
content: list[tuple[str, str]], compress: bool = False, deftype: str = "text/plain", delimiter: str = ":"
|
||||
) -> str: ...
|
||||
def guess_mime_type(content: str, deftype: str) -> str: ...
|
||||
def compute_md5(fp: IO[Any], buf_size: int = ..., size: int | None = ...) -> tuple[str, str, int]: ...
|
||||
def compute_hash(fp: IO[Any], buf_size: int = ..., size: int | None = ..., hash_algorithm: Any = ...) -> tuple[str, str, int]: ...
|
||||
def compute_md5(fp: IO[Any], buf_size: int = 8192, size: int | None = None) -> tuple[str, str, int]: ...
|
||||
def compute_hash(
|
||||
fp: IO[Any], buf_size: int = 8192, size: int | None = None, hash_algorithm: Any = ...
|
||||
) -> tuple[str, str, int]: ...
|
||||
def find_matching_headers(name: str, headers: Mapping[str, str | None]) -> list[str]: ...
|
||||
def merge_headers_by_name(name: str, headers: Mapping[str, str | None]) -> str: ...
|
||||
|
||||
class RequestHook:
|
||||
def handle_request_data(
|
||||
self, request: boto.connection.HTTPRequest, response: boto.connection.HTTPResponse, error: bool = ...
|
||||
self, request: boto.connection.HTTPRequest, response: boto.connection.HTTPResponse, error: bool = False
|
||||
) -> Any: ...
|
||||
|
||||
def host_is_ipv6(hostname: str) -> bool: ...
|
||||
|
||||
@@ -14,13 +14,13 @@ class Address(Resource):
|
||||
Electronic: str
|
||||
ShipToStore: str
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = ...): ...
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def delete(customer_id, address_id): ...
|
||||
@staticmethod
|
||||
def find(customer_id, address_id): ...
|
||||
@staticmethod
|
||||
def update(customer_id, address_id, params: Incomplete | None = ...): ...
|
||||
def update(customer_id, address_id, params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -11,7 +11,7 @@ class AddressGateway:
|
||||
gateway: Any
|
||||
config: Any
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = ...): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def delete(self, customer_id, address_id): ...
|
||||
def find(self, customer_id, address_id): ...
|
||||
def update(self, customer_id, address_id, params: Incomplete | None = ...): ...
|
||||
def update(self, customer_id, address_id, params: Incomplete | None = None): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class AttributeGetter:
|
||||
def __init__(self, attributes: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, attributes: Incomplete | None = None) -> None: ...
|
||||
|
||||
@@ -58,4 +58,4 @@ class BraintreeGateway:
|
||||
verification: Any
|
||||
webhook_notification: Any
|
||||
webhook_testing: Any
|
||||
def __init__(self, config: Incomplete | None = ..., **kwargs) -> None: ...
|
||||
def __init__(self, config: Incomplete | None = None, **kwargs) -> None: ...
|
||||
|
||||
@@ -7,6 +7,6 @@ from braintree.util.crypto import Crypto as Crypto
|
||||
|
||||
class ClientToken:
|
||||
@staticmethod
|
||||
def generate(params: Incomplete | None = ..., gateway: Incomplete | None = ...): ...
|
||||
def generate(params: Incomplete | None = None, gateway: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def generate_signature(): ...
|
||||
|
||||
@@ -9,4 +9,4 @@ class ClientTokenGateway:
|
||||
gateway: Any
|
||||
config: Any
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def generate(self, params: Incomplete | None = ...): ...
|
||||
def generate(self, params: Incomplete | None = None): ...
|
||||
|
||||
@@ -30,13 +30,13 @@ class Configuration:
|
||||
wrap_http_exceptions: Any
|
||||
def __init__(
|
||||
self,
|
||||
environment: Incomplete | None = ...,
|
||||
merchant_id: Incomplete | None = ...,
|
||||
public_key: Incomplete | None = ...,
|
||||
private_key: Incomplete | None = ...,
|
||||
client_id: Incomplete | None = ...,
|
||||
client_secret: Incomplete | None = ...,
|
||||
access_token: Incomplete | None = ...,
|
||||
environment: Incomplete | None = None,
|
||||
merchant_id: Incomplete | None = None,
|
||||
public_key: Incomplete | None = None,
|
||||
private_key: Incomplete | None = None,
|
||||
client_id: Incomplete | None = None,
|
||||
client_secret: Incomplete | None = None,
|
||||
access_token: Incomplete | None = None,
|
||||
*args,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
|
||||
@@ -9,7 +9,7 @@ class CredentialsParser:
|
||||
client_secret: Any
|
||||
access_token: Any
|
||||
def __init__(
|
||||
self, client_id: Incomplete | None = ..., client_secret: Incomplete | None = ..., access_token: Incomplete | None = ...
|
||||
self, client_id: Incomplete | None = None, client_secret: Incomplete | None = None, access_token: Incomplete | None = None
|
||||
) -> None: ...
|
||||
environment: Any
|
||||
def parse_client_credentials(self) -> None: ...
|
||||
|
||||
@@ -45,9 +45,9 @@ class CreditCard(Resource):
|
||||
Prepaid: Any
|
||||
ProductId: Any
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = ...): ...
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def update(credit_card_token, params: Incomplete | None = ...): ...
|
||||
def update(credit_card_token, params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def delete(credit_card_token): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -13,11 +13,11 @@ class CreditCardGateway:
|
||||
gateway: Any
|
||||
config: Any
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = ...): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def delete(self, credit_card_token): ...
|
||||
def expired(self): ...
|
||||
def expiring_between(self, start_date, end_date): ...
|
||||
def find(self, credit_card_token): ...
|
||||
def forward(self, credit_card_token, receiving_merchant_id) -> None: ...
|
||||
def from_nonce(self, nonce): ...
|
||||
def update(self, credit_card_token, params: Incomplete | None = ...): ...
|
||||
def update(self, credit_card_token, params: Incomplete | None = None): ...
|
||||
|
||||
@@ -26,15 +26,15 @@ class Customer(Resource):
|
||||
@staticmethod
|
||||
def all(): ...
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = ...): ...
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def delete(customer_id): ...
|
||||
@staticmethod
|
||||
def find(customer_id, association_filter_id: Incomplete | None = ...): ...
|
||||
def find(customer_id, association_filter_id: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def search(*query): ...
|
||||
@staticmethod
|
||||
def update(customer_id, params: Incomplete | None = ...): ...
|
||||
def update(customer_id, params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -14,8 +14,8 @@ class CustomerGateway:
|
||||
config: Any
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def all(self): ...
|
||||
def create(self, params: Incomplete | None = ...): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def delete(self, customer_id): ...
|
||||
def find(self, customer_id, association_filter_id: Incomplete | None = ...): ...
|
||||
def find(self, customer_id, association_filter_id: Incomplete | None = None): ...
|
||||
def search(self, *query): ...
|
||||
def update(self, customer_id, params: Incomplete | None = ...): ...
|
||||
def update(self, customer_id, params: Incomplete | None = None): ...
|
||||
|
||||
@@ -8,7 +8,7 @@ class DocumentUpload(Resource):
|
||||
class Kind:
|
||||
EvidenceDocument: str
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = ...): ...
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
|
||||
@@ -10,4 +10,4 @@ class DocumentUploadGateway:
|
||||
gateway: Any
|
||||
config: Any
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = ...): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user