Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/Jetson.GPIO/Jetson/GPIO/gpio_event.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BOTH_EDGE: Final = 3
def add_edge_detect(
chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, poll_time: float
) -> Literal[1, 2, 0]: ...
def remove_edge_detect(chip_name: str, channel: int, timeout: float = ...) -> None: ...
def remove_edge_detect(chip_name: str, channel: int, timeout: float = 0.3) -> None: ...
def add_edge_callback(chip_name: str, channel: int, callback: Callable[[int], None]) -> None: ...
def edge_event_detected(chip_name: str, channel: int) -> bool: ...
def gpio_event_added(chip_name: str, channel: int) -> Any: ...
Expand Down
32 changes: 18 additions & 14 deletions stubs/PyYAML/yaml/emitter.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,26 @@ class Emitter:
def __init__(
self,
stream: _WriteStream[Any],
canonical: bool | None = ...,
indent: int | None = ...,
width: int | None = ...,
allow_unicode: bool | None = ...,
line_break: str | None = ...,
canonical: bool | None = None,
indent: int | None = None,
width: int | None = None,
allow_unicode: bool | None = None,
line_break: str | None = None,
) -> None: ...
def dispose(self) -> None: ...
def emit(self, event: Event) -> None: ...
def need_more_events(self) -> bool: ...
def need_events(self, count: int) -> bool: ...
def increase_indent(self, flow: bool = ..., indentless: bool = ...) -> None: ...
def increase_indent(self, flow: bool = False, indentless: bool = False) -> None: ...
def expect_stream_start(self) -> None: ...
def expect_nothing(self) -> NoReturn: ...
def expect_first_document_start(self) -> None: ...
def expect_document_start(self, first: bool = False) -> None: ...
def expect_document_end(self) -> None: ...
def expect_document_root(self) -> None: ...
def expect_node(self, root: bool = ..., sequence: bool = ..., mapping: bool = ..., simple_key: bool = ...) -> None: ...
def expect_node(
self, root: bool = False, sequence: bool = False, mapping: bool = False, simple_key: bool = False
) -> None: ...
def expect_alias(self) -> None: ...
def expect_scalar(self) -> None: ...
def expect_flow_sequence(self) -> None: ...
Expand All @@ -92,10 +94,10 @@ class Emitter:
def expect_flow_mapping_value(self) -> None: ...
def expect_block_sequence(self) -> None: ...
def expect_first_block_sequence_item(self) -> None: ...
def expect_block_sequence_item(self, first: bool = ...) -> None: ...
def expect_block_sequence_item(self, first: bool = False) -> None: ...
def expect_block_mapping(self) -> None: ...
def expect_first_block_mapping_key(self) -> None: ...
def expect_block_mapping_key(self, first: bool = ...) -> None: ...
def expect_block_mapping_key(self, first: bool = False) -> None: ...
def expect_block_mapping_simple_value(self) -> None: ...
def expect_block_mapping_value(self) -> None: ...
def check_empty_sequence(self) -> bool: ...
Expand All @@ -115,17 +117,19 @@ class Emitter:
def flush_stream(self) -> None: ...
def write_stream_start(self) -> None: ...
def write_stream_end(self) -> None: ...
def write_indicator(self, indicator: str, need_whitespace: bool, whitespace: bool = ..., indention: bool = ...) -> None: ...
def write_indicator(
self, indicator: str, need_whitespace: bool, whitespace: bool = False, indention: bool = False
) -> None: ...
def write_indent(self) -> None: ...
def write_line_break(self, data: str | None = ...) -> None: ...
def write_line_break(self, data: str | None = None) -> None: ...
def write_version_directive(self, version_text: str) -> None: ...
def write_tag_directive(self, handle_text: str, prefix_text: str) -> None: ...
def write_single_quoted(self, text: str, split: bool = ...) -> None: ...
def write_single_quoted(self, text: str, split: bool = True) -> None: ...
ESCAPE_REPLACEMENTS: dict[str, str]
def write_double_quoted(self, text: str, split: bool = ...) -> None: ...
def write_double_quoted(self, text: str, split: bool = True) -> None: ...
def determine_block_hints(self, text: str) -> str: ...
def write_folded(self, text: str) -> None: ...
def write_literal(self, text: str) -> None: ...
def write_plain(self, text: str, split: bool = ...) -> None: ...
def write_plain(self, text: str, split: bool = True) -> None: ...

__all__ = ["Emitter", "EmitterError"]
7 changes: 5 additions & 2 deletions stubs/WebOb/webob/cachecontrol.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class UpdateDict(dict[str, Any]):
updated_args: tuple[Any, ...] | None

class exists_property(Generic[_ScopeT]):
def __init__(self, prop: str, type: _ScopeT = ...) -> None: ...
@overload
def __init__(self: exists_property[None], prop: str) -> None: ...
@overload
def __init__(self, prop: str, type: _ScopeT) -> None: ...
@overload
def __get__(self, obj: None, type: type[CacheControl[Any]] | None = None) -> Self: ...
@overload
Expand All @@ -31,7 +34,7 @@ class exists_property(Generic[_ScopeT]):
def __delete__(self, obj: CacheControl[_ScopeT]) -> None: ...

class value_property(Generic[_T, _DefaultT, _NoneLiteral, _ScopeT]):
def __init__(self, prop: str, default: _DefaultT = ..., none: _NoneLiteral = ..., type: _ScopeT = ...) -> None: ...
def __init__(self, prop: str, default: _DefaultT = None, none: _NoneLiteral = None, type: _ScopeT = None) -> None: ... # type: ignore[assignment]
@overload
def __get__(self, obj: None, type: type[CacheControl[Any]] | None = None) -> Self: ...
@overload
Expand Down
20 changes: 10 additions & 10 deletions stubs/aiofiles/aiofiles/os.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def remove(
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
) -> None: ...
async def unlink(
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
) -> None: ...
async def mkdir(
path: StrOrBytesPath,
Expand All @@ -91,23 +91,23 @@ async def link(
src: StrOrBytesPath,
dst: StrOrBytesPath,
*,
src_dir_fd: int | None = ...,
dst_dir_fd: int | None = ...,
follow_symlinks: bool = ...,
src_dir_fd: int | None = None,
dst_dir_fd: int | None = None,
follow_symlinks: bool = True,
loop: AbstractEventLoop | None = ...,
executor: Executor | None = ...,
) -> None: ...
async def symlink(
src: StrOrBytesPath,
dst: StrOrBytesPath,
target_is_directory: bool = ...,
target_is_directory: bool = False,
*,
dir_fd: int | None = ...,
dir_fd: int | None = None,
loop: AbstractEventLoop | None = ...,
executor: Executor | None = ...,
) -> None: ...
async def readlink(
path: AnyStr, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
path: AnyStr, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
) -> AnyStr: ...
async def rmdir(
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
Expand Down Expand Up @@ -157,9 +157,9 @@ if sys.platform != "win32":
in_fd: int,
offset: int,
count: int,
headers: Sequence[ReadableBuffer] = ...,
trailers: Sequence[ReadableBuffer] = ...,
flags: int = ...,
headers: Sequence[ReadableBuffer] = (),
trailers: Sequence[ReadableBuffer] = (),
flags: int = 0,
*,
loop: AbstractEventLoop | None = ...,
executor: Executor | None = ...,
Expand Down
4 changes: 2 additions & 2 deletions stubs/auth0-python/auth0/authentication/token_verifier.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class SymmetricSignatureVerifier(SignatureVerifier):

class JwksFetcher:
CACHE_TTL: ClassVar[int]
def __init__(self, jwks_url: str, cache_ttl: int = ...) -> None: ...
def __init__(self, jwks_url: str, cache_ttl: int = 600) -> None: ...
def get_key(self, key_id: str): ...

class AsymmetricSignatureVerifier(SignatureVerifier):
def __init__(self, jwks_url: str, algorithm: str = "RS256", cache_ttl: int = ...) -> None: ...
def __init__(self, jwks_url: str, algorithm: str = "RS256", cache_ttl: int = 600) -> None: ...

class TokenVerifier:
iss: str
Expand Down
2 changes: 1 addition & 1 deletion stubs/boltons/boltons/dictutils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class OrderedMultiDict(dict[_KT, _VT]):
def popall(self, k: _KT, default: _VT = ...) -> list[_VT]: ...
def poplast(self, k: _KT = ..., default: _VT = ...) -> _VT: ...
@overload # type: ignore[override]
def setdefault(self, k: _KT, default: None = ...) -> _VT | None: ...
def setdefault(self, k: _KT, default: None = None) -> _VT | None: ...
@overload
def setdefault(self, k: _KT, default: _VT) -> _VT: ...
def sorted(self, key: _KT | None = None, reverse: bool = False) -> Self: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/cffi/cffi/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FFI:
if sys.platform == "win32":
def dlopen(self, name: str, flags: int = ...) -> _cffi_backend.Lib: ...
else:
def dlopen(self, name: str | None, flags: int = ...) -> _cffi_backend.Lib: ...
def dlopen(self, name: str | None, flags: int = 0) -> _cffi_backend.Lib: ...

def dlclose(self, lib: _cffi_backend.Lib) -> None: ...
def typeof(self, cdecl: str | CData | types.BuiltinFunctionType | types.FunctionType) -> CType: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/cffi/cffi/pkgconfig.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Sequence

def merge_flags(cfg1: dict[str, list[str]], cfg2: dict[str, list[str]]) -> dict[str, list[str]]: ...
def call(libname: str, flag: str, encoding: str = ...) -> str: ...
def call(libname: str, flag: str, encoding: str = "utf-8") -> str: ...
def flags_from_pkgconfig(libs: Sequence[str]) -> dict[str, list[str]]: ...
4 changes: 2 additions & 2 deletions stubs/channels/channels/layers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class InMemoryChannelLayer(BaseChannelLayer):
expiry: int = 60,
group_expiry: int = 86400,
capacity: int = 100,
channel_capacity: _ChannelCapacityDict | None = ...,
channel_capacity: _ChannelCapacityDict | None = None,
) -> None: ...

extensions: list[str]
Expand All @@ -86,6 +86,6 @@ class InMemoryChannelLayer(BaseChannelLayer):
async def group_discard(self, group: str, channel: str) -> None: ...
async def group_send(self, group: str, message: dict[str, Any]) -> None: ...

def get_channel_layer(alias: str = ...) -> BaseChannelLayer | None: ...
def get_channel_layer(alias: str = "default") -> BaseChannelLayer | None: ...

channel_layers: ChannelLayerManager
22 changes: 7 additions & 15 deletions stubs/defusedxml/defusedxml/lxml.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class _ElementBase: ...
class RestrictedElement(_ElementBase):
blacklist: Incomplete
def __iter__(self): ...
def iterchildren(self, tag: Incomplete | None = ..., reversed: bool = ...): ...
def iter(self, tag: Incomplete | None = ..., *tags): ...
def iterdescendants(self, tag: Incomplete | None = ..., *tags): ...
def itersiblings(self, tag: Incomplete | None = ..., preceding: bool = ...): ...
def iterchildren(self, tag=None, reversed: bool = False): ...
def iter(self, tag=None, *tags): ...
def iterdescendants(self, tag=None, *tags): ...
def itersiblings(self, tag=None, preceding: bool = False): ...
def getchildren(self): ...
def getiterator(self, tag: Incomplete | None = ...): ...
def getiterator(self, tag=None): ...

class GlobalParserTLS(threading.local):
parser_config: Incomplete
Expand All @@ -46,16 +46,8 @@ class GlobalParserTLS(threading.local):

def getDefaultParser(): ...
def check_docinfo(elementtree, forbid_dtd: bool = False, forbid_entities: bool = True) -> None: ...
def parse(
source,
parser: Incomplete | None = ...,
base_url: Incomplete | None = ...,
forbid_dtd: bool = ...,
forbid_entities: bool = ...,
): ...
def fromstring(
text, parser: Incomplete | None = ..., base_url: Incomplete | None = ..., forbid_dtd: bool = ..., forbid_entities: bool = ...
): ...
def parse(source, parser=None, base_url=None, forbid_dtd: bool = False, forbid_entities: bool = True): ...
def fromstring(text, parser=None, base_url=None, forbid_dtd: bool = False, forbid_entities: bool = True): ...

XML = fromstring

Expand Down
2 changes: 1 addition & 1 deletion stubs/django-import-export/import_export/resources.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Resource(Generic[_ModelT], metaclass=DeclarativeMetaclass):
@overload
def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[True]) -> NoReturn: ...
@overload
def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[False] = ...) -> None: ...
def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[False] = False) -> None: ...
def import_row(self, row: dict[str, Any], instance_loader: BaseInstanceLoader, **kwargs: Any) -> RowResult: ...
def import_data(
self,
Expand Down
2 changes: 1 addition & 1 deletion stubs/docker/docker/transport/sshconn.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ class SSHHTTPAdapter(BaseHTTPAdapter):
timeout: Incomplete
max_pool_size: Incomplete
pools: Incomplete
def __init__(self, base_url, timeout: int = 60, pool_connections=..., max_pool_size=..., shell_out: bool = False) -> None: ...
def __init__(self, base_url, timeout: int = 60, pool_connections=25, max_pool_size=10, shell_out: bool = False) -> None: ...
def get_connection(self, url, proxies=None): ...
def close(self) -> None: ...
4 changes: 2 additions & 2 deletions stubs/docutils/docutils/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def publish_cmdline(
config_section: str | None = None,
enable_exit_status: bool = True,
argv: list[str] | None = None,
usage: str = ...,
usage: str = "%prog [options] [<source> [<destination>]]",
description: str = ...,
): ...
def publish_file(
Expand Down Expand Up @@ -182,7 +182,7 @@ def publish_cmdline_to_binary(
config_section: str | None = None,
enable_exit_status: bool = True,
argv: list[str] | None = None,
usage: str = ...,
usage: str = "%prog [options] [<source> [<destination>]]",
description: str = ...,
destination=None,
destination_class=...,
Expand Down
4 changes: 2 additions & 2 deletions stubs/docutils/docutils/frontend.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ class ConfigParser(RawConfigParser):
old_warning: ClassVar[str]
not_utf8_error: ClassVar[str]
@overload # type: ignore[override]
def read(self, filenames: str | Sequence[str], option_parser: None = None) -> list[str]: ...
def read(self, filenames: str | Sequence[str]) -> list[str]: ...
@overload
@deprecated("The `option_parser` parameter is deprecated and will be removed in Docutils 0.24.")
def read(self, filenames: str | Sequence[str], option_parser: OptionParser = ...) -> list[str]: ...
def read(self, filenames: str | Sequence[str], option_parser: OptionParser | None) -> list[str]: ...
def handle_old_config(self, filename: str) -> None: ...
def validate_settings(self, filename: str, option_parser: OptionParser) -> None: ...
def optionxform(self, optionstr: str) -> str: ...
Expand Down
4 changes: 2 additions & 2 deletions stubs/docutils/docutils/writers/latex2e/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
def visit_docinfo(self, node: nodes.docinfo) -> None: ...
def depart_docinfo(self, node: nodes.docinfo) -> None: ...
@overload
def visit_docinfo_item(self, node, name: None = None) -> None: ...
def visit_docinfo_item(self, node) -> None: ...
@overload
@deprecated("The `name` parameter is deprecated and will be removed in Docutils 0.24.")
def visit_docinfo_item(self, node, name: str = ...) -> None: ...
def visit_docinfo_item(self, node, name: str | None) -> None: ...
def depart_docinfo_item(self, node) -> None: ...
def visit_doctest_block(self, node: nodes.doctest_block) -> None: ...
def depart_doctest_block(self, node: nodes.doctest_block) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/fanstatic/fanstatic/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class NeededResources:
recompute_hashes: bool = True,
base_url: str | None = None,
script_name: str | None = None,
publisher_signature: str = ...,
publisher_signature: str = "fanstatic",
resources: Iterable[Dependable] | None = None,
) -> None: ...
def has_resources(self) -> bool: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/fanstatic/fanstatic/publisher.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Delegator:
publisher: Publisher
publisher_signature: str
trigger: str
def __init__(self, app: WSGIApplication, publisher: Publisher, publisher_signature: str = ...) -> None: ...
def __init__(self, app: WSGIApplication, publisher: Publisher, publisher_signature: str = "fanstatic") -> None: ...
def is_resource(self, request: Request) -> bool: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

Expand Down
2 changes: 1 addition & 1 deletion stubs/fanstatic/fanstatic/wsgi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from webob import Request, Response
from webob.dec import wsgify

def Fanstatic(
app: WSGIApplication, publisher_signature: str = ..., injector: InjectorPlugin | None = None, **config: Any
app: WSGIApplication, publisher_signature: str = "fanstatic", injector: InjectorPlugin | None = None, **config: Any
) -> Delegator: ...
def make_fanstatic(app: WSGIApplication, global_config: Any, **local_config: Any) -> Delegator: ...

Expand Down
1 change: 1 addition & 0 deletions stubs/gevent/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ gevent.socket.getnameinfo
gevent.socket.socket.closed
gevent.socket.wait_readwrite
gevent.socket.wait_write
gevent.socket.socket.__slots__

# we have punted on ssl, the gevent version of these functions have an additional
# argument for timeouts/blocking and there are some with different default values
Expand Down
8 changes: 4 additions & 4 deletions stubs/gevent/gevent/_ffi/loop.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class _SupportsHandleError(Protocol):
_ErrorHandler: TypeAlias = _ErrorHandlerFunc | _SupportsHandleError

def assign_standard_callbacks(
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ...
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ()
) -> object: ...

class AbstractLoop:
Expand All @@ -28,7 +28,7 @@ class AbstractLoop:
starting_timer_may_update_loop_time: bool
# internal API, this __init__ will only be called from subclasses
def __init__(
self, ffi: object, lib: object, watchers: object, flags: int | None = ..., default: bool | None = ...
self, ffi: object, lib: object, watchers: object, flags: int | None = None, default: bool | None = None
) -> None: ...
def destroy(self) -> bool | None: ...
@property
Expand Down Expand Up @@ -78,10 +78,10 @@ class AbstractLoop:
def install_sigchld(self) -> None: ...

def async_(self, ref: bool = True, priority: int | None = None) -> _AsyncWatcher: ...
def stat(self, path: str, interval: float = 0.0, ref: bool = True, priority: bool | None = ...) -> _StatWatcher: ...
def stat(self, path: str, interval: float = 0.0, ref: bool = True, priority: bool | None = None) -> _StatWatcher: ...
def run_callback(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
def run_callback_threadsafe(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
def callback(self, priority: float | None = ...) -> _Callback: ...
def callback(self, priority: float | None = None) -> _Callback: ...
def fileno(self) -> FileDescriptor | None: ...

__all__ = ["AbstractLoop", "assign_standard_callbacks"]
2 changes: 1 addition & 1 deletion stubs/gevent/gevent/_ffi/watcher.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AbstractWatcherType(type):

class watcher(metaclass=AbstractWatcherType):
loop: _Loop
def __init__(self, _loop: _Loop, ref: bool = True, priority: int | None = None, args: tuple[object, ...] = ...) -> None: ...
def __init__(self, _loop: _Loop, ref: bool = True, priority: int | None = None, args: tuple[object, ...] = ()) -> None: ...
def close(self) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
Expand Down
Loading
Loading