From bb7c3761423c9294d5d956de3215c3ecdea8e753 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 27 Mar 2023 18:20:30 +0100 Subject: [PATCH] Add defaults for third-party stubs M-O (#9956) --- stubs/Markdown/markdown/blockprocessors.pyi | 4 +- stubs/Markdown/markdown/core.pyi | 2 +- .../Markdown/markdown/extensions/__init__.pyi | 2 +- .../markdown/extensions/codehilite.pyi | 2 +- .../markdown/extensions/footnotes.pyi | 4 +- stubs/Markdown/markdown/extensions/toc.pyi | 2 +- stubs/Markdown/markdown/inlinepatterns.pyi | 4 +- stubs/Markdown/markdown/treeprocessors.pyi | 2 +- stubs/Markdown/markdown/util.pyi | 8 +- stubs/mock/mock/mock.pyi | 130 +++++++++--------- stubs/mysqlclient/MySQLdb/connections.pyi | 2 +- stubs/mysqlclient/MySQLdb/cursors.pyi | 10 +- .../netaddr/contrib/subnet_splitter.pyi | 2 +- stubs/netaddr/netaddr/core.pyi | 2 +- stubs/netaddr/netaddr/eui/__init__.pyi | 12 +- stubs/netaddr/netaddr/ip/__init__.pyi | 26 ++-- stubs/netaddr/netaddr/ip/iana.pyi | 4 +- stubs/netaddr/netaddr/ip/sets.pyi | 8 +- stubs/netaddr/netaddr/strategy/__init__.pyi | 6 +- stubs/netaddr/netaddr/strategy/eui48.pyi | 16 +-- stubs/netaddr/netaddr/strategy/eui64.pyi | 16 +-- stubs/netaddr/netaddr/strategy/ipv4.pyi | 6 +- stubs/netaddr/netaddr/strategy/ipv6.pyi | 10 +- stubs/oauthlib/oauthlib/common.pyi | 19 ++- .../oauthlib/oauth1/rfc5849/__init__.pyi | 34 ++--- .../oauth1/rfc5849/endpoints/access_token.pyi | 8 +- .../rfc5849/endpoints/authorization.pyi | 12 +- .../oauth1/rfc5849/endpoints/base.pyi | 2 +- .../rfc5849/endpoints/request_token.pyi | 8 +- .../oauth1/rfc5849/endpoints/resource.pyi | 8 +- .../rfc5849/endpoints/signature_only.pyi | 4 +- .../oauthlib/oauth1/rfc5849/errors.pyi | 8 +- .../oauthlib/oauth1/rfc5849/signature.pyi | 20 +-- .../rfc6749/clients/backend_application.pyi | 4 +- .../oauthlib/oauth2/rfc6749/clients/base.pyi | 64 +++++---- .../rfc6749/clients/legacy_application.pyi | 2 +- .../rfc6749/clients/mobile_application.pyi | 9 +- .../rfc6749/clients/service_application.pyi | 28 ++-- .../rfc6749/clients/web_application.pyi | 24 ++-- .../rfc6749/endpoints/authorization.pyi | 12 +- .../oauth2/rfc6749/endpoints/introspect.pyi | 4 +- .../oauth2/rfc6749/endpoints/metadata.pyi | 6 +- .../rfc6749/endpoints/pre_configured.pyi | 30 ++-- .../oauth2/rfc6749/endpoints/resource.pyi | 8 +- .../oauth2/rfc6749/endpoints/revocation.pyi | 6 +- .../oauth2/rfc6749/endpoints/token.pyi | 12 +- .../oauthlib/oauth2/rfc6749/errors.pyi | 12 +- .../oauth2/rfc6749/grant_types/base.pyi | 2 +- .../rfc6749/grant_types/refresh_token.pyi | 2 +- .../oauthlib/oauth2/rfc6749/parameters.pyi | 20 +-- .../oauthlib/oauth2/rfc6749/tokens.pyi | 34 ++--- .../connect/core/endpoints/pre_configured.pyi | 6 +- .../connect/core/endpoints/userinfo.pyi | 2 +- .../openid/connect/core/exceptions.pyi | 2 +- .../core/grant_types/authorization_code.pyi | 2 +- .../openid/connect/core/grant_types/base.pyi | 2 +- .../connect/core/grant_types/dispatchers.pyi | 6 +- .../connect/core/grant_types/hybrid.pyi | 2 +- .../connect/core/grant_types/implicit.pyi | 2 +- .../oauthlib/openid/connect/core/tokens.pyi | 10 +- stubs/oauthlib/oauthlib/signals.pyi | 4 +- .../opentracing/mocktracer/context.pyi | 4 +- .../opentracing/mocktracer/span.pyi | 14 +- .../opentracing/mocktracer/tracer.pyi | 14 +- stubs/opentracing/opentracing/span.pyi | 6 +- stubs/opentracing/opentracing/tracer.pyi | 32 ++--- 66 files changed, 407 insertions(+), 383 deletions(-) diff --git a/stubs/Markdown/markdown/blockprocessors.pyi b/stubs/Markdown/markdown/blockprocessors.pyi index 70919f799..f8e1c60e3 100644 --- a/stubs/Markdown/markdown/blockprocessors.pyi +++ b/stubs/Markdown/markdown/blockprocessors.pyi @@ -16,8 +16,8 @@ class BlockProcessor: tab_length: int def __init__(self, parser: BlockParser) -> None: ... def lastChild(self, parent: Element) -> Element | None: ... - def detab(self, text: str, length: int | None = ...) -> tuple[str, str]: ... - def looseDetab(self, text: str, level: int = ...) -> str: ... + def detab(self, text: str, length: int | None = None) -> tuple[str, str]: ... + def looseDetab(self, text: str, level: int = 1) -> str: ... def test(self, parent: Element, block: str) -> bool: ... def run(self, parent: Element, blocks: list[str]) -> bool | None: ... diff --git a/stubs/Markdown/markdown/core.pyi b/stubs/Markdown/markdown/core.pyi index 394417945..4f4df50db 100644 --- a/stubs/Markdown/markdown/core.pyi +++ b/stubs/Markdown/markdown/core.pyi @@ -49,7 +49,7 @@ class Markdown: def is_block_level(self, tag: str) -> bool: ... def convert(self, source: str) -> str: ... def convertFile( - self, input: str | _ReadableStream | None = ..., output: str | _WritableStream | None = ..., encoding: str | None = ... + self, input: str | _ReadableStream | None = None, output: str | _WritableStream | None = None, encoding: str | None = None ) -> Markdown: ... def markdown( diff --git a/stubs/Markdown/markdown/extensions/__init__.pyi b/stubs/Markdown/markdown/extensions/__init__.pyi index e01e02de6..dca230d46 100644 --- a/stubs/Markdown/markdown/extensions/__init__.pyi +++ b/stubs/Markdown/markdown/extensions/__init__.pyi @@ -6,7 +6,7 @@ from markdown.core import Markdown class Extension: config: Mapping[str, list[Any]] = ... def __init__(self, **kwargs: Any) -> None: ... - def getConfig(self, key: str, default: Any = ...) -> Any: ... + def getConfig(self, key: str, default: Any = "") -> Any: ... def getConfigs(self) -> dict[str, Any]: ... def getConfigInfo(self) -> list[tuple[str, str]]: ... def setConfig(self, key: str, value: Any) -> None: ... diff --git a/stubs/Markdown/markdown/extensions/codehilite.pyi b/stubs/Markdown/markdown/extensions/codehilite.pyi index 2526ce4c0..df9948b65 100644 --- a/stubs/Markdown/markdown/extensions/codehilite.pyi +++ b/stubs/Markdown/markdown/extensions/codehilite.pyi @@ -35,7 +35,7 @@ class CodeHilite: use_pygments: bool = ..., **options: Any, ) -> None: ... - def hilite(self, shebang: bool = ...) -> str: ... + def hilite(self, shebang: bool = True) -> str: ... class HiliteTreeprocessor(Treeprocessor): def code_unescape(self, text): ... diff --git a/stubs/Markdown/markdown/extensions/footnotes.pyi b/stubs/Markdown/markdown/extensions/footnotes.pyi index 3f9320314..2a47df472 100644 --- a/stubs/Markdown/markdown/extensions/footnotes.pyi +++ b/stubs/Markdown/markdown/extensions/footnotes.pyi @@ -23,12 +23,12 @@ class FootnoteExtension(Extension): md: Markdown footnotes: Any def reset(self) -> None: ... - def unique_ref(self, reference, found: bool = ...): ... + def unique_ref(self, reference, found: bool = False): ... def findFootnotesPlaceholder(self, root): ... def setFootnote(self, id, text) -> None: ... def get_separator(self): ... def makeFootnoteId(self, id): ... - def makeFootnoteRefId(self, id, found: bool = ...): ... + def makeFootnoteRefId(self, id, found: bool = False): ... def makeFootnotesDiv(self, root): ... class FootnotePreprocessor(Preprocessor): diff --git a/stubs/Markdown/markdown/extensions/toc.pyi b/stubs/Markdown/markdown/extensions/toc.pyi index 519880bb9..7c0f96397 100644 --- a/stubs/Markdown/markdown/extensions/toc.pyi +++ b/stubs/Markdown/markdown/extensions/toc.pyi @@ -11,7 +11,7 @@ IDCOUNT_RE: Pattern[str] def unique(id, ids): ... def get_name(el): ... -def stashedHTML2text(text, md, strip_entities: bool = ...): ... +def stashedHTML2text(text, md, strip_entities: bool = True): ... def unescape(text): ... def nest_toc_tokens(toc_list): ... diff --git a/stubs/Markdown/markdown/inlinepatterns.pyi b/stubs/Markdown/markdown/inlinepatterns.pyi index 6cea38b1f..5621e0409 100644 --- a/stubs/Markdown/markdown/inlinepatterns.pyi +++ b/stubs/Markdown/markdown/inlinepatterns.pyi @@ -40,7 +40,7 @@ class Pattern: pattern: Any compiled_re: Any md: Markdown - def __init__(self, pattern, md: Markdown | None = ...) -> None: ... + def __init__(self, pattern, md: Markdown | None = None) -> None: ... def getCompiledRegExp(self): ... def handleMatch(self, m: Match[str]) -> str | Element | None: ... def type(self): ... @@ -48,7 +48,7 @@ class Pattern: class InlineProcessor(Pattern): safe_mode: bool = ... - def __init__(self, pattern, md: Markdown | None = ...) -> None: ... + def __init__(self, pattern, md: Markdown | None = None) -> None: ... def handleMatch(self, m: Match[str], data) -> tuple[Element, int, int] | tuple[None, None, None]: ... # type: ignore[override] class SimpleTextPattern(Pattern): ... diff --git a/stubs/Markdown/markdown/treeprocessors.pyi b/stubs/Markdown/markdown/treeprocessors.pyi index 86968de15..5e9e7936e 100644 --- a/stubs/Markdown/markdown/treeprocessors.pyi +++ b/stubs/Markdown/markdown/treeprocessors.pyi @@ -17,7 +17,7 @@ class InlineProcessor(Treeprocessor): def __init__(self, md) -> None: ... stashed_nodes: Any parent_map: Any - def run(self, tree: Element, ancestors: Incomplete | None = ...) -> Element: ... + def run(self, tree: Element, ancestors: Incomplete | None = None) -> Element: ... class PrettifyTreeprocessor(Treeprocessor): ... diff --git a/stubs/Markdown/markdown/util.pyi b/stubs/Markdown/markdown/util.pyi index 865abdd55..88f01f4ca 100644 --- a/stubs/Markdown/markdown/util.pyi +++ b/stubs/Markdown/markdown/util.pyi @@ -15,8 +15,8 @@ HTML_PLACEHOLDER_RE: Pattern[str] TAG_PLACEHOLDER: Any RTL_BIDI_RANGES: Any -def deprecated(message: str, stacklevel: int = ...): ... -def parseBoolValue(value: object, fail_on_errors: bool = ..., preserve_none: bool = ...) -> bool | None: ... +def deprecated(message: str, stacklevel: int = 2): ... +def parseBoolValue(value: object, fail_on_errors: bool = True, preserve_none: bool = False) -> bool | None: ... def code_escape(text: str) -> str: ... def nearing_recursion_limit() -> bool: ... @@ -24,7 +24,7 @@ class AtomicString(str): ... class Processor: md: Markdown - def __init__(self, md: Markdown | None = ...) -> None: ... + def __init__(self, md: Markdown | None = None) -> None: ... class HtmlStash: html_counter: int = ... @@ -48,4 +48,4 @@ class Registry: def __len__(self) -> int: ... def get_index_for_name(self, name: str) -> int: ... def register(self, item: Any, name: str, priority: float) -> None: ... - def deregister(self, name: str, strict: bool = ...) -> None: ... + def deregister(self, name: str, strict: bool = True) -> None: ... diff --git a/stubs/mock/mock/mock.pyi b/stubs/mock/mock/mock.pyi index 2723619a3..fb74c59eb 100644 --- a/stubs/mock/mock/mock.pyi +++ b/stubs/mock/mock/mock.pyi @@ -46,22 +46,22 @@ DEFAULT: _SentinelObject class _Call(tuple[Any, ...]): def __new__( cls, - value: Any = ..., - name: Incomplete | None = ..., - parent: Incomplete | None = ..., - two: bool = ..., - from_kall: bool = ..., + value: Any = (), + name: Incomplete | None = "", + parent: Incomplete | None = None, + two: bool = False, + from_kall: bool = True, ) -> Self: ... name: Any parent: Any from_kall: Any def __init__( self, - value: Any = ..., - name: Incomplete | None = ..., - parent: Incomplete | None = ..., - two: bool = ..., - from_kall: bool = ..., + value: Any = (), + name: Incomplete | None = None, + parent: Incomplete | None = None, + two: bool = False, + from_kall: bool = True, ) -> None: ... def __eq__(self, other: object) -> bool: ... def __ne__(self, __other: object) -> bool: ... @@ -86,48 +86,48 @@ class Base: class NonCallableMock(Base, Any): def __new__( cls, - spec: list[str] | object | type[object] | None = ..., - wraps: Incomplete | None = ..., - name: str | None = ..., - spec_set: list[str] | object | type[object] | None = ..., - parent: NonCallableMock | None = ..., - _spec_state: Incomplete | None = ..., - _new_name: str = ..., - _new_parent: NonCallableMock | None = ..., - _spec_as_instance: bool = ..., - _eat_self: bool | None = ..., - unsafe: bool = ..., + spec: list[str] | object | type[object] | None = None, + wraps: Incomplete | None = None, + name: str | None = None, + spec_set: list[str] | object | type[object] | None = None, + parent: NonCallableMock | None = None, + _spec_state: Incomplete | None = None, + _new_name: str = "", + _new_parent: NonCallableMock | None = None, + _spec_as_instance: bool = False, + _eat_self: bool | None = None, + unsafe: bool = False, **kwargs: Any, ) -> Self: ... def __init__( self, - spec: list[str] | object | type[object] | None = ..., - wraps: Incomplete | None = ..., - name: str | None = ..., - spec_set: list[str] | object | type[object] | None = ..., - parent: NonCallableMock | None = ..., - _spec_state: Incomplete | None = ..., - _new_name: str = ..., - _new_parent: NonCallableMock | None = ..., - _spec_as_instance: bool = ..., - _eat_self: bool | None = ..., - unsafe: bool = ..., + spec: list[str] | object | type[object] | None = None, + wraps: Incomplete | None = None, + name: str | None = None, + spec_set: list[str] | object | type[object] | None = None, + parent: NonCallableMock | None = None, + _spec_state: Incomplete | None = None, + _new_name: str = "", + _new_parent: NonCallableMock | None = None, + _spec_as_instance: bool = False, + _eat_self: bool | None = None, + unsafe: bool = False, **kwargs: Any, ) -> None: ... def __getattr__(self, name: str) -> Any: ... - def _calls_repr(self, prefix: str = ...) -> str: ... + def _calls_repr(self, prefix: str = "Calls") -> str: ... def assert_called_with(_mock_self, *args: Any, **kwargs: Any) -> None: ... def assert_not_called(_mock_self) -> None: ... def assert_called_once_with(_mock_self, *args: Any, **kwargs: Any) -> None: ... - def _format_mock_failure_message(self, args: Any, kwargs: Any, action: str = ...) -> str: ... + def _format_mock_failure_message(self, args: Any, kwargs: Any, action: str = "call") -> str: ... def assert_called(_mock_self) -> None: ... def assert_called_once(_mock_self) -> None: ... - def reset_mock(self, visited: Any = ..., *, return_value: bool = ..., side_effect: bool = ...) -> None: ... + def reset_mock(self, visited: Any = None, *, return_value: bool = False, side_effect: bool = False) -> None: ... def _extract_mock_name(self) -> str: ... def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ... - def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ... - def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ... - def _mock_add_spec(self, spec: Any, spec_set: bool, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ... + def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = False) -> None: ... + def mock_add_spec(self, spec: Any, spec_set: bool = False) -> None: ... + def _mock_add_spec(self, spec: Any, spec_set: bool, _spec_as_instance: bool = False, _eat_self: bool = False) -> None: ... def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ... def configure_mock(self, **kwargs: Any) -> None: ... return_value: Any @@ -145,16 +145,16 @@ class CallableMixin(Base): side_effect: Any def __init__( self, - spec: Incomplete | None = ..., - side_effect: Incomplete | None = ..., + spec: Incomplete | None = None, + side_effect: Incomplete | None = None, return_value: Any = ..., - wraps: Incomplete | None = ..., - name: Incomplete | None = ..., - spec_set: Incomplete | None = ..., - parent: Incomplete | None = ..., - _spec_state: Incomplete | None = ..., - _new_name: Any = ..., - _new_parent: Incomplete | None = ..., + wraps: Incomplete | None = None, + name: Incomplete | None = None, + spec_set: Incomplete | None = None, + parent: Incomplete | None = None, + _spec_state: Incomplete | None = None, + _new_name: Any = "", + _new_parent: Incomplete | None = None, **kwargs: Any, ) -> None: ... def __call__(_mock_self, *args: Any, **kwargs: Any) -> Any: ... @@ -186,7 +186,7 @@ class _patch(Generic[_T]): new_callable: Incomplete | None, kwargs: Mapping[str, Any], *, - unsafe: bool = ..., + unsafe: bool = False, ) -> None: ... def copy(self) -> _patch[_T]: ... def __call__(self, func: Callable[..., _R]) -> Callable[..., _R]: ... @@ -211,7 +211,7 @@ class _patch_dict: in_dict: Any values: Any clear: Any - def __init__(self, in_dict: Any, values: Any = ..., clear: Any = ..., **kwargs: Any) -> None: ... + def __init__(self, in_dict: Any, values: Any = (), clear: Any = False, **kwargs: Any) -> None: ... def __call__(self, f: Any) -> Any: ... def decorate_callable(self, f: _F) -> _F: ... def decorate_async_callable(self, f: _AF) -> _AF: ... @@ -303,10 +303,10 @@ class MagicMixin: def __init__(self, *args: Any, **kw: Any) -> None: ... class NonCallableMagicMock(MagicMixin, NonCallableMock): - def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ... + def mock_add_spec(self, spec: Any, spec_set: bool = False) -> None: ... class MagicMock(MagicMixin, Mock): - def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ... + def mock_add_spec(self, spec: Any, spec_set: bool = False) -> None: ... class AsyncMockMixin(Base): def __init__(self, *args: Any, **kwargs: Any) -> None: ... @@ -315,7 +315,7 @@ class AsyncMockMixin(Base): def assert_awaited_with(_mock_self, *args: Any, **kwargs: Any) -> None: ... def assert_awaited_once_with(_mock_self, *args: Any, **kwargs: Any) -> None: ... def assert_any_await(_mock_self, *args: Any, **kwargs: Any) -> None: ... - def assert_has_awaits(_mock_self, calls: _CallList, any_order: bool = ...) -> None: ... + def assert_has_awaits(_mock_self, calls: _CallList, any_order: bool = False) -> None: ... def assert_not_awaited(_mock_self) -> None: ... def reset_mock(self, *args: Any, **kwargs: Any) -> None: ... await_count: int @@ -334,7 +334,7 @@ class MagicProxy(Base): parent: Any def __init__(self, name: str, parent: Any) -> None: ... def create_mock(self) -> Any: ... - def __get__(self, obj: Any, _type: Incomplete | None = ...) -> Any: ... + def __get__(self, obj: Any, _type: Incomplete | None = None) -> Any: ... class _ANY: def __eq__(self, other: object) -> Literal[True]: ... @@ -344,12 +344,12 @@ ANY: Any def create_autospec( spec: Any, - spec_set: Any = ..., - instance: Any = ..., - _parent: Incomplete | None = ..., - _name: Incomplete | None = ..., + spec_set: Any = False, + instance: Any = False, + _parent: Incomplete | None = None, + _name: Incomplete | None = None, *, - unsafe: bool = ..., + unsafe: bool = False, **kwargs: Any, ) -> Any: ... @@ -363,17 +363,17 @@ class _SpecState: def __init__( self, spec: Any, - spec_set: Any = ..., - parent: Incomplete | None = ..., - name: Incomplete | None = ..., - ids: Incomplete | None = ..., - instance: Any = ..., + spec_set: Any = False, + parent: Incomplete | None = None, + name: Incomplete | None = None, + ids: Incomplete | None = None, + instance: Any = False, ) -> None: ... -def mock_open(mock: Incomplete | None = ..., read_data: Any = ...) -> Any: ... +def mock_open(mock: Incomplete | None = None, read_data: Any = "") -> Any: ... class PropertyMock(Mock): - def __get__(self, obj: _T, obj_type: type[_T] | None = ...) -> Self: ... + def __get__(self, obj: _T, obj_type: type[_T] | None = None) -> Self: ... def __set__(self, obj: Any, value: Any) -> None: ... def seal(mock: Any) -> None: ... diff --git a/stubs/mysqlclient/MySQLdb/connections.pyi b/stubs/mysqlclient/MySQLdb/connections.pyi index d1034859a..327e76137 100644 --- a/stubs/mysqlclient/MySQLdb/connections.pyi +++ b/stubs/mysqlclient/MySQLdb/connections.pyi @@ -32,7 +32,7 @@ class Connection(_mysql.connection): self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None ) -> None: ... def autocommit(self, on: bool) -> None: ... - def cursor(self, cursorclass: type[cursors.BaseCursor] | None = ...): ... + def cursor(self, cursorclass: type[cursors.BaseCursor] | None = None): ... def query(self, query) -> None: ... def literal(self, o): ... def begin(self) -> None: ... diff --git a/stubs/mysqlclient/MySQLdb/cursors.pyi b/stubs/mysqlclient/MySQLdb/cursors.pyi index 2f1020c35..a739d1228 100644 --- a/stubs/mysqlclient/MySQLdb/cursors.pyi +++ b/stubs/mysqlclient/MySQLdb/cursors.pyi @@ -33,23 +33,23 @@ class BaseCursor: def nextset(self): ... def setinputsizes(self, *args) -> None: ... def setoutputsizes(self, *args) -> None: ... - def execute(self, query, args: Incomplete | None = ...): ... + def execute(self, query, args: Incomplete | None = None): ... def executemany(self, query: str, args: list[Any]) -> int: ... - def callproc(self, procname, args=...): ... + def callproc(self, procname, args=()): ... def __iter__(self): ... class CursorStoreResultMixIn: rownumber: Any def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... - def scroll(self, value, mode: str = ...) -> None: ... + def scroll(self, value, mode: str = "relative") -> None: ... def __iter__(self): ... class CursorUseResultMixIn: rownumber: Any def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... def __iter__(self): ... def next(self): ... diff --git a/stubs/netaddr/netaddr/contrib/subnet_splitter.pyi b/stubs/netaddr/netaddr/contrib/subnet_splitter.pyi index 2e4200065..55edd7f09 100644 --- a/stubs/netaddr/netaddr/contrib/subnet_splitter.pyi +++ b/stubs/netaddr/netaddr/contrib/subnet_splitter.pyi @@ -2,6 +2,6 @@ from netaddr.ip import IPNetwork, _IPAddressAddr class SubnetSplitter: def __init__(self, base_cidr: _IPAddressAddr) -> None: ... - def extract_subnet(self, prefix: int, count: int | None = ...) -> list[IPNetwork]: ... + def extract_subnet(self, prefix: int, count: int | None = None) -> list[IPNetwork]: ... def available_subnets(self) -> list[IPNetwork]: ... def remove_subnet(self, ip_network: IPNetwork) -> None: ... diff --git a/stubs/netaddr/netaddr/core.pyi b/stubs/netaddr/netaddr/core.pyi index da4d657f3..d0fdf7548 100644 --- a/stubs/netaddr/netaddr/core.pyi +++ b/stubs/netaddr/netaddr/core.pyi @@ -22,7 +22,7 @@ class Subscriber: class PrettyPrinter(Subscriber): fh: SupportsWrite[str] write_eol: bool - def __init__(self, fh: SupportsWrite[str] = ..., write_eol: bool = ...) -> None: ... + def __init__(self, fh: SupportsWrite[str] = ..., write_eol: bool = True) -> None: ... def update(self, data: object) -> None: ... class Publisher: diff --git a/stubs/netaddr/netaddr/eui/__init__.pyi b/stubs/netaddr/netaddr/eui/__init__.pyi index 9d2b963e0..5cd87789d 100644 --- a/stubs/netaddr/netaddr/eui/__init__.pyi +++ b/stubs/netaddr/netaddr/eui/__init__.pyi @@ -21,21 +21,21 @@ class OUI(BaseIdentifier): def __ne__(self, other: object) -> bool: ... @property def reg_count(self) -> int: ... - def registration(self, index: int = ...) -> DictDotLookup: ... + def registration(self, index: int = 0) -> DictDotLookup: ... class IAB(BaseIdentifier): IAB_EUI_VALUES: ClassVar[tuple[int, int]] @classmethod - def split_iab_mac(cls, eui_int: int, strict: bool = ...) -> tuple[int, int]: ... + def split_iab_mac(cls, eui_int: int, strict: bool = False) -> tuple[int, int]: ... record: dict[str, object] - def __init__(self, iab: str | int, strict: bool = ...) -> None: ... + def __init__(self, iab: str | int, strict: bool = False) -> None: ... def __eq__(self, other: object) -> bool: ... def __ne__(self, other: object) -> bool: ... def registration(self) -> DictDotLookup: ... class EUI(BaseIdentifier): def __init__( - self, addr: EUI | int | str, version: int | None = ..., dialect: type[mac_eui48] | type[eui64_base] | None = ... + self, addr: EUI | int | str, version: int | None = None, dialect: type[mac_eui48] | type[eui64_base] | None = None ) -> None: ... @property def value(self) -> int: ... @@ -68,7 +68,7 @@ class EUI(BaseIdentifier): def __le__(self, other: EUI | int | str) -> bool: ... def __gt__(self, other: EUI | int | str) -> bool: ... def __ge__(self, other: EUI | int | str) -> bool: ... - def bits(self, word_sep: str | None = ...) -> str: ... + def bits(self, word_sep: str | None = None) -> str: ... @property def packed(self) -> bytes: ... @property @@ -81,4 +81,4 @@ class EUI(BaseIdentifier): def ipv6_link_local(self) -> IPAddress: ... @property def info(self) -> DictDotLookup: ... - def format(self, dialect: type[mac_eui48] | type[eui64_base] | None = ...) -> str: ... + def format(self, dialect: type[mac_eui48] | type[eui64_base] | None = None) -> str: ... diff --git a/stubs/netaddr/netaddr/ip/__init__.pyi b/stubs/netaddr/netaddr/ip/__init__.pyi index 91651b731..24ed94f73 100644 --- a/stubs/netaddr/netaddr/ip/__init__.pyi +++ b/stubs/netaddr/netaddr/ip/__init__.pyi @@ -41,7 +41,7 @@ _IPAddressAddr: TypeAlias = BaseIP | int | str _IPNetworkAddr: TypeAlias = IPNetwork | IPAddress | tuple[int, int] | str class IPAddress(BaseIP): - def __init__(self, addr: _IPAddressAddr, version: Literal[4, 6] | None = ..., flags: int = ...) -> None: ... + def __init__(self, addr: _IPAddressAddr, version: Literal[4, 6] | None = None, flags: int = 0) -> None: ... def netmask_bits(self) -> int: ... def is_hostmask(self) -> bool: ... def is_netmask(self) -> bool: ... @@ -59,7 +59,7 @@ class IPAddress(BaseIP): def __hex__(self) -> str: ... def __index__(self) -> int: ... def __bytes__(self) -> bytes: ... - def bits(self, word_sep: str | None = ...) -> str: ... + def bits(self, word_sep: str | None = None) -> str: ... @property def packed(self) -> bytes: ... @property @@ -69,8 +69,8 @@ class IPAddress(BaseIP): @property def reverse_dns(self) -> str: ... def ipv4(self) -> Self: ... - def ipv6(self, ipv4_compatible: bool = ...) -> Self: ... - def format(self, dialect: type[ipv6_verbose] | None = ...) -> str: ... + def ipv6(self, ipv4_compatible: bool = False) -> Self: ... + def format(self, dialect: type[ipv6_verbose] | None = None) -> str: ... def __or__(self, other: str | SupportsInt | SupportsIndex) -> Self: ... def __and__(self, other: str | SupportsInt | SupportsIndex) -> Self: ... def __xor__(self, other: str | SupportsInt | SupportsIndex) -> Self: ... @@ -93,12 +93,12 @@ class IPListMixin: def __bool__(self) -> Literal[True]: ... def parse_ip_network( - module: Incomplete, addr: tuple[int, int] | str, implicit_prefix: bool = ..., flags: int = ... + module: Incomplete, addr: tuple[int, int] | str, implicit_prefix: bool = False, flags: int = 0 ) -> tuple[int, int]: ... class IPNetwork(BaseIP, IPListMixin): def __init__( - self, addr: _IPNetworkAddr, implicit_prefix: bool = ..., version: Literal[4, 6] | None = ..., flags: int = ... + self, addr: _IPNetworkAddr, implicit_prefix: bool = False, version: Literal[4, 6] | None = None, flags: int = 0 ) -> None: ... @property def prefixlen(self) -> int: ... @@ -129,15 +129,15 @@ class IPNetwork(BaseIP, IPListMixin): def key(self) -> tuple[int, ...]: ... def sort_key(self) -> tuple[int, ...]: ... def ipv4(self) -> Self: ... - def ipv6(self, ipv4_compatible: bool = ...) -> Self: ... - def previous(self, step: int = ...) -> Self: ... - def next(self, step: int = ...) -> Self: ... - def supernet(self, prefixlen: int = ...) -> list[IPNetwork]: ... - def subnet(self, prefixlen: int, count: int | None = ..., fmt: Unused = None) -> Iterator[Self]: ... + def ipv6(self, ipv4_compatible: bool = False) -> Self: ... + def previous(self, step: int = 1) -> Self: ... + def next(self, step: int = 1) -> Self: ... + def supernet(self, prefixlen: int = 0) -> list[IPNetwork]: ... + def subnet(self, prefixlen: int, count: int | None = None, fmt: Unused = None) -> Iterator[Self]: ... def iter_hosts(self) -> Iterator[IPAddress]: ... class IPRange(BaseIP, IPListMixin): - def __init__(self, start: _IPAddressAddr, end: _IPAddressAddr, flags: int = ...) -> None: ... + def __init__(self, start: _IPAddressAddr, end: _IPAddressAddr, flags: int = 0) -> None: ... def __contains__(self, other: BaseIP | _IPAddressAddr) -> bool: ... @property def first(self) -> int: ... @@ -155,7 +155,7 @@ def cidr_partition( target: _IPNetworkAddr, exclude: _IPNetworkAddr ) -> tuple[list[IPNetwork], list[IPNetwork], list[IPNetwork]]: ... def spanning_cidr(ip_addrs: Iterable[_IPNetworkAddr]) -> IPNetwork: ... -def iter_iprange(start: _IPAddressAddr, end: _IPAddressAddr, step: SupportsInt | SupportsIndex = ...) -> Iterator[IPAddress]: ... +def iter_iprange(start: _IPAddressAddr, end: _IPAddressAddr, step: SupportsInt | SupportsIndex = 1) -> Iterator[IPAddress]: ... def iprange_to_cidrs(start: _IPNetworkAddr, end: _IPNetworkAddr) -> list[IPNetwork]: ... def smallest_matching_cidr(ip: _IPAddressAddr, cidrs: Iterable[_IPNetworkAddr]) -> IPNetwork | None: ... def largest_matching_cidr(ip: _IPAddressAddr, cidrs: Iterable[_IPNetworkAddr]) -> IPNetwork | None: ... diff --git a/stubs/netaddr/netaddr/ip/iana.pyi b/stubs/netaddr/netaddr/ip/iana.pyi index ef3657aa9..268023950 100644 --- a/stubs/netaddr/netaddr/ip/iana.pyi +++ b/stubs/netaddr/netaddr/ip/iana.pyi @@ -13,7 +13,7 @@ _IanaInfoKey: TypeAlias = IPAddress | IPNetwork | IPRange IANA_INFO: dict[str, dict[_IanaInfoKey, dict[str, str]]] class SaxRecordParser(handler.ContentHandler): - def __init__(self, callback: Callable[[Mapping[str, object] | None], object] | None = ...) -> None: ... + def __init__(self, callback: Callable[[Mapping[str, object] | None], object] | None = None) -> None: ... def startElement(self, name: str, attrs: Mapping[str, object]) -> None: ... def endElement(self, name: str) -> None: ... def characters(self, content: str) -> None: ... @@ -48,5 +48,5 @@ class DictUpdater(Subscriber): def update(self, data: Incomplete) -> None: ... def load_info() -> None: ... -def pprint_info(fh: SupportsWrite[str] | None = ...) -> None: ... +def pprint_info(fh: SupportsWrite[str] | None = None) -> None: ... def query(ip_addr: IPAddress) -> dict[str, list[dict[str, str]]]: ... diff --git a/stubs/netaddr/netaddr/ip/sets.pyi b/stubs/netaddr/netaddr/ip/sets.pyi index ac6e2cb1b..49f9cf64d 100644 --- a/stubs/netaddr/netaddr/ip/sets.pyi +++ b/stubs/netaddr/netaddr/ip/sets.pyi @@ -7,19 +7,19 @@ from netaddr.ip import IPAddress, IPNetwork, IPRange, _IPNetworkAddr _IPIterable: TypeAlias = IPNetwork | IPRange | IPSet | Iterable[_IPNetworkAddr | IPRange | int] class IPSet: - def __init__(self, iterable: _IPIterable | None = ..., flags: int = ...) -> None: ... + def __init__(self, iterable: _IPIterable | None = None, flags: int = 0) -> None: ... def compact(self) -> None: ... def __hash__(self) -> NoReturn: ... def __contains__(self, ip: _IPNetworkAddr) -> bool: ... def __bool__(self) -> bool: ... def __iter__(self) -> Iterator[IPAddress]: ... def iter_cidrs(self) -> list[IPNetwork]: ... - def add(self, addr: IPRange | _IPNetworkAddr | int, flags: int = ...) -> None: ... - def remove(self, addr: IPRange | _IPNetworkAddr | int, flags: int = ...) -> None: ... + def add(self, addr: IPRange | _IPNetworkAddr | int, flags: int = 0) -> None: ... + def remove(self, addr: IPRange | _IPNetworkAddr | int, flags: int = 0) -> None: ... def pop(self) -> IPNetwork: ... def isdisjoint(self, other: IPSet) -> bool: ... def copy(self) -> Self: ... - def update(self, iterable: _IPIterable, flags: int = ...) -> None: ... + def update(self, iterable: _IPIterable, flags: int = 0) -> None: ... def clear(self) -> None: ... def __eq__(self, other: object) -> bool: ... def __ne__(self, other: object) -> bool: ... diff --git a/stubs/netaddr/netaddr/strategy/__init__.pyi b/stubs/netaddr/netaddr/strategy/__init__.pyi index d2daa0f00..0e93ac08c 100644 --- a/stubs/netaddr/netaddr/strategy/__init__.pyi +++ b/stubs/netaddr/netaddr/strategy/__init__.pyi @@ -7,9 +7,9 @@ BYTES_TO_BITS: list[str] def valid_words(words: Iterable[int], word_size: int, num_words: int) -> bool: ... def int_to_words(int_val: int, word_size: int, num_words: int) -> tuple[int, ...]: ... def words_to_int(words: Sequence[int], word_size: int, num_words: int) -> int: ... -def valid_bits(bits: str, width: int, word_sep: str = ...) -> bool: ... -def bits_to_int(bits: str, width: int, word_sep: str = ...) -> int: ... -def int_to_bits(int_val: int, word_size: int, num_words: int, word_sep: str = ...) -> str: ... +def valid_bits(bits: str, width: int, word_sep: str = "") -> bool: ... +def bits_to_int(bits: str, width: int, word_sep: str = "") -> int: ... +def int_to_bits(int_val: int, word_size: int, num_words: int, word_sep: str = "") -> str: ... def valid_bin(bin_val: str, width: int) -> bool: ... def int_to_bin(int_val: int, width: int) -> str: ... def bin_to_int(bin_val: str, width: int) -> int: ... diff --git a/stubs/netaddr/netaddr/strategy/eui48.pyi b/stubs/netaddr/netaddr/strategy/eui48.pyi index aa7dcb241..8f62c3295 100644 --- a/stubs/netaddr/netaddr/strategy/eui48.pyi +++ b/stubs/netaddr/netaddr/strategy/eui48.pyi @@ -29,15 +29,15 @@ RE_MAC_FORMATS: list[Pattern[str]] def valid_str(addr: str) -> bool: ... def str_to_int(addr: str) -> int: ... -def int_to_str(int_val: int, dialect: type[mac_eui48] | None = ...) -> str: ... +def int_to_str(int_val: int, dialect: type[mac_eui48] | None = None) -> str: ... def int_to_packed(int_val: int) -> bytes: ... def packed_to_int(packed_int: bytes) -> int: ... -def valid_words(words: Iterable[int], dialect: type[mac_eui48] | None = ...) -> bool: ... -def int_to_words(int_val: int, dialect: type[mac_eui48] | None = ...) -> tuple[int, ...]: ... -def words_to_int(words: Sequence[int], dialect: type[mac_eui48] | None = ...) -> int: ... -def valid_bits(bits: str, dialect: type[mac_eui48] | None = ...) -> bool: ... -def bits_to_int(bits: str, dialect: type[mac_eui48] | None = ...) -> int: ... -def int_to_bits(int_val: int, dialect: type[mac_eui48] | None = ...) -> str: ... -def valid_bin(bin_val: str, dialect: type[mac_eui48] | None = ...) -> bool: ... +def valid_words(words: Iterable[int], dialect: type[mac_eui48] | None = None) -> bool: ... +def int_to_words(int_val: int, dialect: type[mac_eui48] | None = None) -> tuple[int, ...]: ... +def words_to_int(words: Sequence[int], dialect: type[mac_eui48] | None = None) -> int: ... +def valid_bits(bits: str, dialect: type[mac_eui48] | None = None) -> bool: ... +def bits_to_int(bits: str, dialect: type[mac_eui48] | None = None) -> int: ... +def int_to_bits(int_val: int, dialect: type[mac_eui48] | None = None) -> str: ... +def valid_bin(bin_val: str, dialect: type[mac_eui48] | None = None) -> bool: ... def int_to_bin(int_val: int) -> str: ... def bin_to_int(bin_val: str) -> int: ... diff --git a/stubs/netaddr/netaddr/strategy/eui64.pyi b/stubs/netaddr/netaddr/strategy/eui64.pyi index c5e456cc1..fff9e76b8 100644 --- a/stubs/netaddr/netaddr/strategy/eui64.pyi +++ b/stubs/netaddr/netaddr/strategy/eui64.pyi @@ -28,15 +28,15 @@ RE_EUI64_FORMATS: list[Pattern[str]] def valid_str(addr: str) -> bool: ... def str_to_int(addr: str) -> int: ... -def int_to_str(int_val: int, dialect: type[eui64_base] | None = ...) -> str: ... +def int_to_str(int_val: int, dialect: type[eui64_base] | None = None) -> str: ... def int_to_packed(int_val: int) -> bytes: ... def packed_to_int(packed_int: bytes) -> int: ... -def valid_words(words: Iterable[int], dialect: type[eui64_base] | None = ...) -> bool: ... -def int_to_words(int_val: int, dialect: type[eui64_base] | None = ...) -> tuple[int, ...]: ... -def words_to_int(words: Sequence[int], dialect: type[eui64_base] | None = ...) -> int: ... -def valid_bits(bits: str, dialect: type[eui64_base] | None = ...) -> bool: ... -def bits_to_int(bits: str, dialect: type[eui64_base] | None = ...) -> int: ... -def int_to_bits(int_val: int, dialect: type[eui64_base] | None = ...) -> str: ... -def valid_bin(bin_val: str, dialect: type[eui64_base] | None = ...) -> bool: ... +def valid_words(words: Iterable[int], dialect: type[eui64_base] | None = None) -> bool: ... +def int_to_words(int_val: int, dialect: type[eui64_base] | None = None) -> tuple[int, ...]: ... +def words_to_int(words: Sequence[int], dialect: type[eui64_base] | None = None) -> int: ... +def valid_bits(bits: str, dialect: type[eui64_base] | None = None) -> bool: ... +def bits_to_int(bits: str, dialect: type[eui64_base] | None = None) -> int: ... +def int_to_bits(int_val: int, dialect: type[eui64_base] | None = None) -> str: ... +def valid_bin(bin_val: str, dialect: type[eui64_base] | None = None) -> bool: ... def int_to_bin(int_val: int) -> str: ... def bin_to_int(bin_val: str) -> int: ... diff --git a/stubs/netaddr/netaddr/strategy/ipv4.pyi b/stubs/netaddr/netaddr/strategy/ipv4.pyi index 763a858cb..707fa2174 100644 --- a/stubs/netaddr/netaddr/strategy/ipv4.pyi +++ b/stubs/netaddr/netaddr/strategy/ipv4.pyi @@ -21,8 +21,8 @@ netmask_to_prefix: dict[int, int] prefix_to_hostmask: dict[int, int] hostmask_to_prefix: dict[int, int] -def valid_str(addr: str, flags: int = ...) -> bool: ... -def str_to_int(addr: str, flags: int = ...) -> int: ... +def valid_str(addr: str, flags: int = 0) -> bool: ... +def str_to_int(addr: str, flags: int = 0) -> int: ... def int_to_str(int_val: int, dialect: Unused = None) -> str: ... def int_to_arpa(int_val: int) -> str: ... def int_to_packed(int_val: int) -> bytes: ... @@ -32,7 +32,7 @@ def int_to_words(int_val: int) -> tuple[int, ...]: ... def words_to_int(words: Sequence[int]) -> int: ... def valid_bits(bits: str) -> bool: ... def bits_to_int(bits: str) -> int: ... -def int_to_bits(int_val: int, word_sep: str | None = ...) -> str: ... +def int_to_bits(int_val: int, word_sep: str | None = None) -> str: ... def valid_bin(bin_val: str) -> bool: ... def int_to_bin(int_val: int) -> str: ... def bin_to_int(bin_val: str) -> int: ... diff --git a/stubs/netaddr/netaddr/strategy/ipv6.pyi b/stubs/netaddr/netaddr/strategy/ipv6.pyi index d96f42efe..b553ef001 100644 --- a/stubs/netaddr/netaddr/strategy/ipv6.pyi +++ b/stubs/netaddr/netaddr/strategy/ipv6.pyi @@ -27,18 +27,18 @@ class ipv6_compact: class ipv6_full(ipv6_compact): ... class ipv6_verbose(ipv6_compact): ... -def valid_str(addr: str, flags: int = ...) -> bool: ... -def str_to_int(addr: str, flags: int = ...) -> int: ... -def int_to_str(int_val: int, dialect: type[ipv6_compact] | None = ...) -> str: ... +def valid_str(addr: str, flags: int = 0) -> bool: ... +def str_to_int(addr: str, flags: int = 0) -> int: ... +def int_to_str(int_val: int, dialect: type[ipv6_compact] | None = None) -> str: ... def int_to_arpa(int_val: int) -> str: ... def int_to_packed(int_val: int) -> bytes: ... def packed_to_int(packed_int: bytes) -> int: ... def valid_words(words: Iterable[int]) -> bool: ... -def int_to_words(int_val: int, num_words: int | None = ..., word_size: int | None = ...) -> tuple[int, ...]: ... +def int_to_words(int_val: int, num_words: int | None = None, word_size: int | None = None) -> tuple[int, ...]: ... def words_to_int(words: Sequence[int]) -> int: ... def valid_bits(bits: str) -> bool: ... def bits_to_int(bits: str) -> int: ... -def int_to_bits(int_val: int, word_sep: str | None = ...) -> str: ... +def int_to_bits(int_val: int, word_sep: str | None = None) -> str: ... def valid_bin(bin_val: str) -> bool: ... def int_to_bin(int_val: int) -> str: ... def bin_to_int(bin_val: str) -> int: ... diff --git a/stubs/oauthlib/oauthlib/common.pyi b/stubs/oauthlib/oauthlib/common.pyi index 6dd0f731e..bd1dc5098 100644 --- a/stubs/oauthlib/oauthlib/common.pyi +++ b/stubs/oauthlib/oauthlib/common.pyi @@ -8,7 +8,7 @@ INVALID_HEX_PATTERN: Any always_safe: str log: Any -def quote(s, safe: bytes = ...): ... +def quote(s, safe: bytes = b"/"): ... def unquote(s): ... def urlencode(params): ... def encode_params_utf8(params): ... @@ -20,14 +20,14 @@ def urldecode(query): ... def extract_params(raw): ... def generate_nonce(): ... def generate_timestamp(): ... -def generate_token(length: int = ..., chars=...): ... +def generate_token(length: int = 30, chars=...): ... def generate_signed_token(private_pem, request): ... def verify_signed_token(public_pem, token): ... -def generate_client_id(length: int = ..., chars=...): ... +def generate_client_id(length: int = 30, chars=...): ... def add_params_to_qs(query, params): ... -def add_params_to_uri(uri, params, fragment: bool = ...): ... +def add_params_to_uri(uri, params, fragment: bool = False): ... def safe_string_equals(a, b): ... -def to_unicode(data, encoding: str = ...): ... +def to_unicode(data, encoding: str = "UTF-8"): ... class CaseInsensitiveDict(dict[Any, Any]): proxy: Any @@ -35,7 +35,7 @@ class CaseInsensitiveDict(dict[Any, Any]): def __contains__(self, k): ... def __delitem__(self, k) -> None: ... def __getitem__(self, k): ... - def get(self, k, default: Incomplete | None = ...): ... + def get(self, k, default: Incomplete | None = None): ... def __setitem__(self, k, v) -> None: ... def update(self, *args, **kwargs) -> None: ... @@ -48,7 +48,12 @@ class Request: oauth_params: Any validator_log: Any def __init__( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ..., encoding: str = ... + self, + uri, + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + encoding: str = "utf-8", ): ... def __getattr__(self, name: str): ... @property diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi index 3ee040dbc..6058e9d7f 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi @@ -38,27 +38,27 @@ class Client: def __init__( self, client_key, - client_secret: Incomplete | None = ..., - resource_owner_key: Incomplete | None = ..., - resource_owner_secret: Incomplete | None = ..., - callback_uri: Incomplete | None = ..., - signature_method=..., - signature_type=..., - rsa_key: Incomplete | None = ..., - verifier: Incomplete | None = ..., - realm: Incomplete | None = ..., - encoding: str = ..., - decoding: Incomplete | None = ..., - nonce: Incomplete | None = ..., - timestamp: Incomplete | None = ..., + client_secret: Incomplete | None = None, + resource_owner_key: Incomplete | None = None, + resource_owner_secret: Incomplete | None = None, + callback_uri: Incomplete | None = None, + signature_method="HMAC-SHA1", + signature_type="AUTH_HEADER", + rsa_key: Incomplete | None = None, + verifier: Incomplete | None = None, + realm: Incomplete | None = None, + encoding: str = "utf-8", + decoding: Incomplete | None = None, + nonce: Incomplete | None = None, + timestamp: Incomplete | None = None, ): ... def get_oauth_signature(self, request): ... def get_oauth_params(self, request): ... def sign( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - realm: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + realm: Incomplete | None = None, ): ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/access_token.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/access_token.pyi index 8cd0094cf..b924cc7cc 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/access_token.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/access_token.pyi @@ -10,9 +10,9 @@ class AccessTokenEndpoint(BaseEndpoint): def create_access_token_response( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - credentials: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + credentials: Incomplete | None = None, ): ... def validate_access_token_request(self, request): ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/authorization.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/authorization.pyi index 8e4ec0201..24c7747e1 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/authorization.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/authorization.pyi @@ -7,12 +7,12 @@ class AuthorizationEndpoint(BaseEndpoint): def create_authorization_response( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - realms: Incomplete | None = ..., - credentials: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + realms: Incomplete | None = None, + credentials: Incomplete | None = None, ): ... def get_realms_and_credentials( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ... + self, uri, http_method: str = "GET", body: Incomplete | None = None, headers: Incomplete | None = None ): ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/base.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/base.pyi index 467b40c90..941c42ac8 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/base.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/base.pyi @@ -4,4 +4,4 @@ from typing import Any class BaseEndpoint: request_validator: Any token_generator: Any - def __init__(self, request_validator, token_generator: Incomplete | None = ...) -> None: ... + def __init__(self, request_validator, token_generator: Incomplete | None = None) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/request_token.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/request_token.pyi index a383e70e0..940486b28 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/request_token.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/request_token.pyi @@ -10,9 +10,9 @@ class RequestTokenEndpoint(BaseEndpoint): def create_request_token_response( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - credentials: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + credentials: Incomplete | None = None, ): ... def validate_request_token_request(self, request): ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/resource.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/resource.pyi index 9d7efb837..a7219c670 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/resource.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/resource.pyi @@ -9,8 +9,8 @@ class ResourceEndpoint(BaseEndpoint): def validate_protected_resource_request( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - realms: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + realms: Incomplete | None = None, ): ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/signature_only.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/signature_only.pyi index a8b612bc8..0b0994158 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/signature_only.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/signature_only.pyi @@ -6,4 +6,6 @@ from .base import BaseEndpoint as BaseEndpoint log: Any class SignatureOnlyEndpoint(BaseEndpoint): - def validate_request(self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ...): ... + def validate_request( + self, uri, http_method: str = "GET", body: Incomplete | None = None, headers: Incomplete | None = None + ): ... diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/errors.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/errors.pyi index 311dbff74..4e05e4eca 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/errors.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/errors.pyi @@ -8,10 +8,10 @@ class OAuth1Error(Exception): status_code: Any def __init__( self, - description: Incomplete | None = ..., - uri: Incomplete | None = ..., - status_code: int = ..., - request: Incomplete | None = ..., + description: Incomplete | None = None, + uri: Incomplete | None = None, + status_code: int = 400, + request: Incomplete | None = None, ) -> None: ... def in_uri(self, uri): ... @property diff --git a/stubs/oauthlib/oauthlib/oauth1/rfc5849/signature.pyi b/stubs/oauthlib/oauthlib/oauth1/rfc5849/signature.pyi index 1b7c8df8d..e37b9be48 100644 --- a/stubs/oauthlib/oauthlib/oauth1/rfc5849/signature.pyi +++ b/stubs/oauthlib/oauthlib/oauth1/rfc5849/signature.pyi @@ -4,23 +4,23 @@ from typing import Any log: Any def signature_base_string(http_method: str, base_str_uri: str, normalized_encoded_request_parameters: str) -> str: ... -def base_string_uri(uri: str, host: str | None = ...) -> str: ... +def base_string_uri(uri: str, host: str | None = None) -> str: ... def collect_parameters( - uri_query: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - exclude_oauth_signature: bool = ..., - with_realm: bool = ..., + uri_query: str = "", + body: Incomplete | None = None, + headers: Incomplete | None = None, + exclude_oauth_signature: bool = True, + with_realm: bool = False, ): ... def normalize_parameters(params) -> str: ... def sign_hmac_sha1_with_client(sig_base_str, client): ... -def verify_hmac_sha1(request, client_secret: Incomplete | None = ..., resource_owner_secret: Incomplete | None = ...): ... +def verify_hmac_sha1(request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None): ... def sign_hmac_sha1(base_string, client_secret, resource_owner_secret): ... def sign_hmac_sha256_with_client(sig_base_str, client): ... -def verify_hmac_sha256(request, client_secret: Incomplete | None = ..., resource_owner_secret: Incomplete | None = ...): ... +def verify_hmac_sha256(request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None): ... def sign_hmac_sha256(base_string, client_secret, resource_owner_secret): ... def sign_hmac_sha512_with_client(sig_base_str: str, client): ... -def verify_hmac_sha512(request, client_secret: str | None = ..., resource_owner_secret: str | None = ...): ... +def verify_hmac_sha512(request, client_secret: str | None = None, resource_owner_secret: str | None = None): ... def sign_rsa_sha1_with_client(sig_base_str, client): ... def verify_rsa_sha1(request, rsa_public_key: str): ... def sign_rsa_sha1(base_string, rsa_private_key): ... @@ -30,4 +30,4 @@ def sign_rsa_sha512_with_client(sig_base_str: str, client): ... def verify_rsa_sha512(request, rsa_public_key: str): ... def sign_plaintext_with_client(_signature_base_string, client): ... def sign_plaintext(client_secret, resource_owner_secret): ... -def verify_plaintext(request, client_secret: Incomplete | None = ..., resource_owner_secret: Incomplete | None = ...): ... +def verify_plaintext(request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/backend_application.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/backend_application.pyi index 5c6877c16..8bc1bd5b5 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/backend_application.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/backend_application.pyi @@ -4,4 +4,6 @@ from .base import Client as Client class BackendApplicationClient(Client): grant_type: str - def prepare_request_body(self, body: str = ..., scope: Incomplete | None = ..., include_client_id: bool = ..., **kwargs): ... + def prepare_request_body( + self, body: str = "", scope: Incomplete | None = None, include_client_id: bool = False, **kwargs + ): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi index ff329d440..2a75404ff 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi @@ -28,20 +28,20 @@ class Client: def __init__( self, client_id, - default_token_placement=..., - token_type: str = ..., - access_token: Incomplete | None = ..., - refresh_token: Incomplete | None = ..., - mac_key: Incomplete | None = ..., - mac_algorithm: Incomplete | None = ..., - token: Incomplete | None = ..., - scope: Incomplete | None = ..., - state: Incomplete | None = ..., - redirect_url: Incomplete | None = ..., + default_token_placement="auth_header", + token_type: str = "Bearer", + access_token: Incomplete | None = None, + refresh_token: Incomplete | None = None, + mac_key: Incomplete | None = None, + mac_algorithm: Incomplete | None = None, + token: Incomplete | None = None, + scope: Incomplete | None = None, + state: Incomplete | None = None, + redirect_url: Incomplete | None = None, state_generator=..., - code_verifier: str | None = ..., - code_challenge: str | None = ..., - code_challenge_method: str | None = ..., + code_verifier: str | None = None, + code_challenge: str | None = None, + code_challenge_method: str | None = None, **kwargs, ) -> None: ... @property @@ -52,40 +52,46 @@ class Client: def add_token( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - token_placement: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + token_placement: Incomplete | None = None, **kwargs, ): ... def prepare_authorization_request( self, authorization_url, - state: Incomplete | None = ..., - redirect_url: Incomplete | None = ..., - scope: Incomplete | None = ..., + state: Incomplete | None = None, + redirect_url: Incomplete | None = None, + scope: Incomplete | None = None, **kwargs, ): ... def prepare_token_request( self, token_url, - authorization_response: Incomplete | None = ..., - redirect_url: Incomplete | None = ..., - state: Incomplete | None = ..., - body: str = ..., + authorization_response: Incomplete | None = None, + redirect_url: Incomplete | None = None, + state: Incomplete | None = None, + body: str = "", **kwargs, ): ... def prepare_refresh_token_request( - self, token_url, refresh_token: Incomplete | None = ..., body: str = ..., scope: Incomplete | None = ..., **kwargs + self, token_url, refresh_token: Incomplete | None = None, body: str = "", scope: Incomplete | None = None, **kwargs ): ... def prepare_token_revocation_request( - self, revocation_url, token, token_type_hint: str = ..., body: str = ..., callback: Incomplete | None = ..., **kwargs + self, + revocation_url, + token, + token_type_hint: str = "access_token", + body: str = "", + callback: Incomplete | None = None, + **kwargs, ): ... - def parse_request_body_response(self, body, scope: Incomplete | None = ..., **kwargs): ... + def parse_request_body_response(self, body, scope: Incomplete | None = None, **kwargs): ... def prepare_refresh_body( - self, body: str = ..., refresh_token: Incomplete | None = ..., scope: Incomplete | None = ..., **kwargs + self, body: str = "", refresh_token: Incomplete | None = None, scope: Incomplete | None = None, **kwargs ): ... def create_code_verifier(self, length: int) -> str: ... - def create_code_challenge(self, code_verifier: str, code_challenge_method: str | None = ...) -> str: ... + def create_code_challenge(self, code_verifier: str, code_challenge_method: str | None = None) -> str: ... def populate_code_attributes(self, response) -> None: ... def populate_token_attributes(self, response) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/legacy_application.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/legacy_application.pyi index 5cc028c99..81e2d0600 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/legacy_application.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/legacy_application.pyi @@ -6,5 +6,5 @@ class LegacyApplicationClient(Client): grant_type: str def __init__(self, client_id, **kwargs) -> None: ... def prepare_request_body( - self, username, password, body: str = ..., scope: Incomplete | None = ..., include_client_id: bool = ..., **kwargs + self, username, password, body: str = "", scope: Incomplete | None = None, include_client_id: bool = False, **kwargs ): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/mobile_application.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/mobile_application.pyi index 283d45cf4..ce40e76b2 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/mobile_application.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/mobile_application.pyi @@ -6,7 +6,12 @@ from .base import Client as Client class MobileApplicationClient(Client): response_type: str def prepare_request_uri( - self, uri, redirect_uri: Incomplete | None = ..., scope: Incomplete | None = ..., state: Incomplete | None = ..., **kwargs + self, + uri, + redirect_uri: Incomplete | None = None, + scope: Incomplete | None = None, + state: Incomplete | None = None, + **kwargs, ): ... token: Any - def parse_request_uri_response(self, uri, state: Incomplete | None = ..., scope: Incomplete | None = ...): ... + def parse_request_uri_response(self, uri, state: Incomplete | None = None, scope: Incomplete | None = None): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/service_application.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/service_application.pyi index eba9fe18b..2c3809439 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/service_application.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/service_application.pyi @@ -12,23 +12,23 @@ class ServiceApplicationClient(Client): def __init__( self, client_id, - private_key: Incomplete | None = ..., - subject: Incomplete | None = ..., - issuer: Incomplete | None = ..., - audience: Incomplete | None = ..., + private_key: Incomplete | None = None, + subject: Incomplete | None = None, + issuer: Incomplete | None = None, + audience: Incomplete | None = None, **kwargs, ) -> None: ... def prepare_request_body( self, - private_key: Incomplete | None = ..., - subject: Incomplete | None = ..., - issuer: Incomplete | None = ..., - audience: Incomplete | None = ..., - expires_at: Incomplete | None = ..., - issued_at: Incomplete | None = ..., - extra_claims: Incomplete | None = ..., - body: str = ..., - scope: Incomplete | None = ..., - include_client_id: bool = ..., + private_key: Incomplete | None = None, + subject: Incomplete | None = None, + issuer: Incomplete | None = None, + audience: Incomplete | None = None, + expires_at: Incomplete | None = None, + issued_at: Incomplete | None = None, + extra_claims: Incomplete | None = None, + body: str = "", + scope: Incomplete | None = None, + include_client_id: bool = False, **kwargs, ): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi index c16e9e1ff..ab025bb04 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi @@ -6,24 +6,24 @@ from .base import Client as Client class WebApplicationClient(Client): grant_type: str code: Any - def __init__(self, client_id, code: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, client_id, code: Incomplete | None = None, **kwargs) -> None: ... def prepare_request_uri( self, uri, - redirect_uri: Incomplete | None = ..., - scope: Incomplete | None = ..., - state: Incomplete | None = ..., - code_challenge: str | None = ..., - code_challenge_method: str | None = ..., + redirect_uri: Incomplete | None = None, + scope: Incomplete | None = None, + state: Incomplete | None = None, + code_challenge: str | None = None, + code_challenge_method: str | None = "plain", **kwargs, ): ... def prepare_request_body( self, - code: Incomplete | None = ..., - redirect_uri: Incomplete | None = ..., - body: str = ..., - include_client_id: bool = ..., - code_verifier: str | None = ..., + code: Incomplete | None = None, + redirect_uri: Incomplete | None = None, + body: str = "", + include_client_id: bool = True, + code_verifier: str | None = None, **kwargs, ): ... - def parse_request_uri_response(self, uri, state: Incomplete | None = ...): ... + def parse_request_uri_response(self, uri, state: Incomplete | None = None): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/authorization.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/authorization.pyi index 35d455191..c0f595444 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/authorization.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/authorization.pyi @@ -18,12 +18,12 @@ class AuthorizationEndpoint(BaseEndpoint): def create_authorization_response( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - scopes: Incomplete | None = ..., - credentials: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + scopes: Incomplete | None = None, + credentials: Incomplete | None = None, ): ... def validate_authorization_request( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ... + self, uri, http_method: str = "GET", body: Incomplete | None = None, headers: Incomplete | None = None ): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/introspect.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/introspect.pyi index 40a148ab8..2a933125e 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/introspect.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/introspect.pyi @@ -10,8 +10,8 @@ class IntrospectEndpoint(BaseEndpoint): valid_request_methods: Any request_validator: Any supported_token_types: Any - def __init__(self, request_validator, supported_token_types: Incomplete | None = ...) -> None: ... + def __init__(self, request_validator, supported_token_types: Incomplete | None = None) -> None: ... def create_introspect_response( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ... + self, uri, http_method: str = "POST", body: Incomplete | None = None, headers: Incomplete | None = None ): ... def validate_introspect_request(self, request) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/metadata.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/metadata.pyi index 0c3176e7f..39494768f 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/metadata.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/metadata.pyi @@ -10,12 +10,12 @@ class MetadataEndpoint(BaseEndpoint): endpoints: Any initial_claims: Any claims: Any - def __init__(self, endpoints, claims=..., raise_errors: bool = ...) -> None: ... + def __init__(self, endpoints, claims={}, raise_errors: bool = True) -> None: ... def create_metadata_response( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ... + self, uri, http_method: str = "GET", body: Incomplete | None = None, headers: Incomplete | None = None ): ... def validate_metadata( - self, array, key, is_required: bool = ..., is_list: bool = ..., is_url: bool = ..., is_issuer: bool = ... + self, array, key, is_required: bool = False, is_list: bool = False, is_url: bool = False, is_issuer: bool = False ) -> None: ... def validate_metadata_token(self, claims, endpoint) -> None: ... def validate_metadata_authorization(self, claims, endpoint): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyi index d33ea10ab..35bd25c7e 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyi @@ -17,9 +17,9 @@ class Server(AuthorizationEndpoint, IntrospectEndpoint, TokenEndpoint, ResourceE def __init__( self, request_validator, - token_expires_in: Incomplete | None = ..., - token_generator: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + token_expires_in: Incomplete | None = None, + token_generator: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, *args, **kwargs, ) -> None: ... @@ -31,9 +31,9 @@ class WebApplicationServer(AuthorizationEndpoint, IntrospectEndpoint, TokenEndpo def __init__( self, request_validator, - token_generator: Incomplete | None = ..., - token_expires_in: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + token_generator: Incomplete | None = None, + token_expires_in: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, **kwargs, ) -> None: ... @@ -43,9 +43,9 @@ class MobileApplicationServer(AuthorizationEndpoint, IntrospectEndpoint, Resourc def __init__( self, request_validator, - token_generator: Incomplete | None = ..., - token_expires_in: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + token_generator: Incomplete | None = None, + token_expires_in: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, **kwargs, ) -> None: ... @@ -56,9 +56,9 @@ class LegacyApplicationServer(TokenEndpoint, IntrospectEndpoint, ResourceEndpoin def __init__( self, request_validator, - token_generator: Incomplete | None = ..., - token_expires_in: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + token_generator: Incomplete | None = None, + token_expires_in: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, **kwargs, ) -> None: ... @@ -68,8 +68,8 @@ class BackendApplicationServer(TokenEndpoint, IntrospectEndpoint, ResourceEndpoi def __init__( self, request_validator, - token_generator: Incomplete | None = ..., - token_expires_in: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + token_generator: Incomplete | None = None, + token_expires_in: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, **kwargs, ) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/resource.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/resource.pyi index 19e06ae76..7bc1e22a9 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/resource.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/resource.pyi @@ -16,9 +16,9 @@ class ResourceEndpoint(BaseEndpoint): def verify_request( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - scopes: Incomplete | None = ..., + http_method: str = "GET", + body: Incomplete | None = None, + headers: Incomplete | None = None, + scopes: Incomplete | None = None, ): ... def find_token_type(self, request): ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/revocation.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/revocation.pyi index d99634346..3fb860c8b 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/revocation.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/revocation.pyi @@ -11,8 +11,10 @@ class RevocationEndpoint(BaseEndpoint): request_validator: Any supported_token_types: Any enable_jsonp: Any - def __init__(self, request_validator, supported_token_types: Incomplete | None = ..., enable_jsonp: bool = ...) -> None: ... + def __init__( + self, request_validator, supported_token_types: Incomplete | None = None, enable_jsonp: bool = False + ) -> None: ... def create_revocation_response( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ... + self, uri, http_method: str = "POST", body: Incomplete | None = None, headers: Incomplete | None = None ): ... def validate_revocation_request(self, request) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/token.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/token.pyi index f1a474e94..5d73cc7a8 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/token.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/endpoints/token.pyi @@ -19,11 +19,11 @@ class TokenEndpoint(BaseEndpoint): def create_token_response( self, uri, - http_method: str = ..., - body: Incomplete | None = ..., - headers: Incomplete | None = ..., - credentials: Incomplete | None = ..., - grant_type_for_scope: Incomplete | None = ..., - claims: Incomplete | None = ..., + http_method: str = "POST", + body: Incomplete | None = None, + headers: Incomplete | None = None, + credentials: Incomplete | None = None, + grant_type_for_scope: Incomplete | None = None, + claims: Incomplete | None = None, ): ... def validate_token_request(self, request) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/errors.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/errors.pyi index 1ca35366e..3eb2db2c0 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/errors.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/errors.pyi @@ -15,11 +15,11 @@ class OAuth2Error(Exception): grant_type: Any def __init__( self, - description: Incomplete | None = ..., - uri: Incomplete | None = ..., - state: Incomplete | None = ..., - status_code: Incomplete | None = ..., - request: Incomplete | None = ..., + description: Incomplete | None = None, + uri: Incomplete | None = None, + state: Incomplete | None = None, + status_code: Incomplete | None = None, + request: Incomplete | None = None, ) -> None: ... def in_uri(self, uri): ... @property @@ -138,4 +138,4 @@ class CustomOAuth2Error(OAuth2Error): error: Any def __init__(self, error, *args, **kwargs) -> None: ... -def raise_from_error(error, params: Incomplete | None = ...) -> None: ... +def raise_from_error(error, params: Incomplete | None = None) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/base.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/base.pyi index f44125218..16955dff3 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/base.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/base.pyi @@ -20,7 +20,7 @@ class GrantTypeBase: default_response_mode: str refresh_token: bool response_types: Any - def __init__(self, request_validator: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ... def register_response_type(self, response_type) -> None: ... def register_code_modifier(self, modifier) -> None: ... def register_token_modifier(self, modifier) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/refresh_token.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/refresh_token.pyi index c1d6c179d..61a5eacd1 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/refresh_token.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/refresh_token.pyi @@ -6,6 +6,6 @@ from .base import GrantTypeBase as GrantTypeBase log: Any class RefreshTokenGrant(GrantTypeBase): - def __init__(self, request_validator: Incomplete | None = ..., issue_new_refresh_tokens: bool = ..., **kwargs) -> None: ... + def __init__(self, request_validator: Incomplete | None = None, issue_new_refresh_tokens: bool = True, **kwargs) -> None: ... def create_token_response(self, request, token_handler): ... def validate_token_request(self, request) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi index 2e9fe1277..c0dd38f9a 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi @@ -4,20 +4,20 @@ def prepare_grant_uri( uri, client_id, response_type, - redirect_uri: Incomplete | None = ..., - scope: Incomplete | None = ..., - state: Incomplete | None = ..., - code_challenge: str | None = ..., - code_challenge_method: str | None = ..., + redirect_uri: Incomplete | None = None, + scope: Incomplete | None = None, + state: Incomplete | None = None, + code_challenge: str | None = None, + code_challenge_method: str | None = "plain", **kwargs, ): ... def prepare_token_request( - grant_type, body: str = ..., include_client_id: bool = ..., code_verifier: str | None = ..., **kwargs + grant_type, body: str = "", include_client_id: bool = True, code_verifier: str | None = None, **kwargs ): ... def prepare_token_revocation_request( - url, token, token_type_hint: str = ..., callback: Incomplete | None = ..., body: str = ..., **kwargs + url, token, token_type_hint: str = "access_token", callback: Incomplete | None = None, body: str = "", **kwargs ): ... -def parse_authorization_code_response(uri, state: Incomplete | None = ...): ... -def parse_implicit_response(uri, state: Incomplete | None = ..., scope: Incomplete | None = ...): ... -def parse_token_response(body, scope: Incomplete | None = ...): ... +def parse_authorization_code_response(uri, state: Incomplete | None = None): ... +def parse_implicit_response(uri, state: Incomplete | None = None, scope: Incomplete | None = None): ... +def parse_token_response(body, scope: Incomplete | None = None): ... def validate_token_parameters(params) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/tokens.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/tokens.pyi index 4fded89a5..9ef160a13 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/tokens.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/tokens.pyi @@ -2,7 +2,7 @@ from _typeshed import Incomplete from typing import Any class OAuth2Token(dict[Any, Any]): - def __init__(self, params, old_scope: Incomplete | None = ...) -> None: ... + def __init__(self, params, old_scope: Incomplete | None = None) -> None: ... @property def scope_changed(self): ... @property @@ -23,23 +23,23 @@ def prepare_mac_header( uri, key, http_method, - nonce: Incomplete | None = ..., - headers: Incomplete | None = ..., - body: Incomplete | None = ..., - ext: str = ..., - hash_algorithm: str = ..., - issue_time: Incomplete | None = ..., - draft: int = ..., + nonce: Incomplete | None = None, + headers: Incomplete | None = None, + body: Incomplete | None = None, + ext: str = "", + hash_algorithm: str = "hmac-sha-1", + issue_time: Incomplete | None = None, + draft: int = 0, ): ... def prepare_bearer_uri(token, uri): ... -def prepare_bearer_headers(token, headers: Incomplete | None = ...): ... -def prepare_bearer_body(token, body: str = ...): ... -def random_token_generator(request, refresh_token: bool = ...): ... +def prepare_bearer_headers(token, headers: Incomplete | None = None): ... +def prepare_bearer_body(token, body: str = ""): ... +def random_token_generator(request, refresh_token: bool = False): ... def signed_token_generator(private_pem, **kwargs): ... def get_token_from_header(request): ... class TokenBase: - def __call__(self, request, refresh_token: bool = ...) -> None: ... + def __call__(self, request, refresh_token: bool = False) -> None: ... def validate_request(self, request) -> None: ... def estimate_type(self, request) -> None: ... @@ -50,11 +50,11 @@ class BearerToken(TokenBase): expires_in: Any def __init__( self, - request_validator: Incomplete | None = ..., - token_generator: Incomplete | None = ..., - expires_in: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + request_validator: Incomplete | None = None, + token_generator: Incomplete | None = None, + expires_in: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, ) -> None: ... - def create_token(self, request, refresh_token: bool = ..., **kwargs): ... + def create_token(self, request, refresh_token: bool = False, **kwargs): ... def validate_request(self, request): ... def estimate_type(self, request): ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/pre_configured.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/pre_configured.pyi index c01840dbf..7ad48ddb2 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/pre_configured.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/pre_configured.pyi @@ -28,9 +28,9 @@ class Server(AuthorizationEndpoint, IntrospectEndpoint, TokenEndpoint, ResourceE def __init__( self, request_validator, - token_expires_in: Incomplete | None = ..., - token_generator: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + token_expires_in: Incomplete | None = None, + token_generator: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, *args, **kwargs, ) -> None: ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/userinfo.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/userinfo.pyi index 90bda6046..4e6239a08 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/userinfo.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/endpoints/userinfo.pyi @@ -10,6 +10,6 @@ class UserInfoEndpoint(BaseEndpoint): request_validator: Any def __init__(self, request_validator) -> None: ... def create_userinfo_response( - self, uri, http_method: str = ..., body: Incomplete | None = ..., headers: Incomplete | None = ... + self, uri, http_method: str = "GET", body: Incomplete | None = None, headers: Incomplete | None = None ): ... def validate_userinfo_request(self, request) -> None: ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/exceptions.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/exceptions.pyi index 7976462b5..ceb668657 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/exceptions.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/exceptions.pyi @@ -50,4 +50,4 @@ class InsufficientScopeError(OAuth2Error): status_code: int description: str -def raise_from_error(error, params: Incomplete | None = ...) -> None: ... +def raise_from_error(error, params: Incomplete | None = None) -> None: ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/authorization_code.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/authorization_code.pyi index d9f4eb632..2a0c5d02e 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/authorization_code.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/authorization_code.pyi @@ -7,5 +7,5 @@ log: Any class AuthorizationCodeGrant(GrantTypeBase): proxy_target: Any - def __init__(self, request_validator: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ... def add_id_token(self, token, token_handler, request): ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi index 8cd663245..be05e3f78 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi @@ -8,7 +8,7 @@ class GrantTypeBase: def __setattr__(self, attr: str, value) -> None: ... def validate_authorization_request(self, request): ... def id_token_hash(self, value, hashfunc=...): ... - def add_id_token(self, token, token_handler, request, nonce: Incomplete | None = ...): ... + def add_id_token(self, token, token_handler, request, nonce: Incomplete | None = None): ... def openid_authorization_validator(self, request): ... OpenIDConnectBase = GrantTypeBase diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/dispatchers.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/dispatchers.pyi index aa541de7f..f33ed5281 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/dispatchers.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/dispatchers.pyi @@ -10,14 +10,14 @@ class Dispatcher: class AuthorizationCodeGrantDispatcher(Dispatcher): default_grant: Any oidc_grant: Any - def __init__(self, default_grant: Incomplete | None = ..., oidc_grant: Incomplete | None = ...) -> None: ... + def __init__(self, default_grant: Incomplete | None = None, oidc_grant: Incomplete | None = None) -> None: ... def create_authorization_response(self, request, token_handler): ... def validate_authorization_request(self, request): ... class ImplicitTokenGrantDispatcher(Dispatcher): default_grant: Any oidc_grant: Any - def __init__(self, default_grant: Incomplete | None = ..., oidc_grant: Incomplete | None = ...) -> None: ... + def __init__(self, default_grant: Incomplete | None = None, oidc_grant: Incomplete | None = None) -> None: ... def create_authorization_response(self, request, token_handler): ... def validate_authorization_request(self, request): ... @@ -26,6 +26,6 @@ class AuthorizationTokenGrantDispatcher(Dispatcher): oidc_grant: Any request_validator: Any def __init__( - self, request_validator, default_grant: Incomplete | None = ..., oidc_grant: Incomplete | None = ... + self, request_validator, default_grant: Incomplete | None = None, oidc_grant: Incomplete | None = None ) -> None: ... def create_token_response(self, request, token_handler): ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/hybrid.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/hybrid.pyi index 555f185cd..54daa5e09 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/hybrid.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/hybrid.pyi @@ -11,6 +11,6 @@ log: Any class HybridGrant(GrantTypeBase): request_validator: Any proxy_target: Any - def __init__(self, request_validator: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ... def add_id_token(self, token, token_handler, request): ... def openid_authorization_validator(self, request): ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/implicit.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/implicit.pyi index b99659c11..134af4c4b 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/implicit.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/implicit.pyi @@ -7,6 +7,6 @@ log: Any class ImplicitGrant(GrantTypeBase): proxy_target: Any - def __init__(self, request_validator: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ... def add_id_token(self, token, token_handler, request): ... def openid_authorization_validator(self, request): ... diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/tokens.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/tokens.pyi index efbc471af..4bff4f27f 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/tokens.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/tokens.pyi @@ -10,11 +10,11 @@ class JWTToken(TokenBase): expires_in: Any def __init__( self, - request_validator: Incomplete | None = ..., - token_generator: Incomplete | None = ..., - expires_in: Incomplete | None = ..., - refresh_token_generator: Incomplete | None = ..., + request_validator: Incomplete | None = None, + token_generator: Incomplete | None = None, + expires_in: Incomplete | None = None, + refresh_token_generator: Incomplete | None = None, ) -> None: ... - def create_token(self, request, refresh_token: bool = ...): ... + def create_token(self, request, refresh_token: bool = False): ... def validate_request(self, request): ... def estimate_type(self, request): ... diff --git a/stubs/oauthlib/oauthlib/signals.pyi b/stubs/oauthlib/oauthlib/signals.pyi index d06f06336..33096927c 100644 --- a/stubs/oauthlib/oauthlib/signals.pyi +++ b/stubs/oauthlib/oauthlib/signals.pyi @@ -4,12 +4,12 @@ from typing import Any signals_available: bool class Namespace: - def signal(self, name, doc: Incomplete | None = ...): ... + def signal(self, name, doc: Incomplete | None = None): ... class _FakeSignal: name: Any __doc__: Any - def __init__(self, name, doc: Incomplete | None = ...) -> None: ... + def __init__(self, name, doc: Incomplete | None = None) -> None: ... send: Any connect: Any disconnect: Any diff --git a/stubs/opentracing/opentracing/mocktracer/context.pyi b/stubs/opentracing/opentracing/mocktracer/context.pyi index 3264dd824..09022377e 100644 --- a/stubs/opentracing/opentracing/mocktracer/context.pyi +++ b/stubs/opentracing/opentracing/mocktracer/context.pyi @@ -5,7 +5,9 @@ import opentracing class SpanContext(opentracing.SpanContext): trace_id: int | None span_id: int | None - def __init__(self, trace_id: int | None = ..., span_id: int | None = ..., baggage: dict[str, str] | None = ...) -> None: ... + def __init__( + self, trace_id: int | None = None, span_id: int | None = None, baggage: dict[str, str] | None = None + ) -> None: ... @property def baggage(self) -> dict[str, str]: ... def with_baggage_item(self, key: str, value: str) -> Self: ... diff --git a/stubs/opentracing/opentracing/mocktracer/span.pyi b/stubs/opentracing/opentracing/mocktracer/span.pyi index 9d310d5bf..229af11b8 100644 --- a/stubs/opentracing/opentracing/mocktracer/span.pyi +++ b/stubs/opentracing/opentracing/mocktracer/span.pyi @@ -17,11 +17,11 @@ class MockSpan(Span): def __init__( self, tracer: Tracer, - operation_name: str | None = ..., - context: SpanContext | None = ..., - parent_id: int | None = ..., - tags: dict[str, Any] | None = ..., - start_time: float | None = ..., + operation_name: str | None = None, + context: SpanContext | None = None, + parent_id: int | None = None, + tags: dict[str, Any] | None = None, + start_time: float | None = None, ) -> None: ... @property def tracer(self) -> MockTracer: ... @@ -29,10 +29,10 @@ class MockSpan(Span): def context(self) -> SpanContext: ... def set_operation_name(self, operation_name: str) -> Self: ... def set_tag(self, key: str, value: str | bool | float) -> Self: ... - def log_kv(self, key_values: dict[str, Any], timestamp: float | None = ...) -> Self: ... + def log_kv(self, key_values: dict[str, Any], timestamp: float | None = None) -> Self: ... def set_baggage_item(self, key: str, value: str) -> Self: ... class LogData: key_values: dict[str, Any] timestamp: float | None - def __init__(self, key_values: dict[str, Any], timestamp: float | None = ...) -> None: ... + def __init__(self, key_values: dict[str, Any], timestamp: float | None = None) -> None: ... diff --git a/stubs/opentracing/opentracing/mocktracer/tracer.pyi b/stubs/opentracing/opentracing/mocktracer/tracer.pyi index 9336c1a05..46d12c48f 100644 --- a/stubs/opentracing/opentracing/mocktracer/tracer.pyi +++ b/stubs/opentracing/opentracing/mocktracer/tracer.pyi @@ -8,7 +8,7 @@ from .propagator import Propagator from .span import MockSpan class MockTracer(Tracer): - def __init__(self, scope_manager: ScopeManager | None = ...) -> None: ... + def __init__(self, scope_manager: ScopeManager | None = None) -> None: ... @property def active_span(self) -> MockSpan | None: ... def register_propagator(self, format: str, propagator: Propagator) -> None: ... @@ -16,11 +16,11 @@ class MockTracer(Tracer): def reset(self) -> None: ... def start_span( # type: ignore[override] self, - operation_name: str | None = ..., - child_of: Span | SpanContext | None = ..., - references: list[Reference] | None = ..., - tags: dict[Any, Any] | None = ..., - start_time: float | None = ..., - ignore_active_span: bool = ..., + operation_name: str | None = None, + child_of: Span | SpanContext | None = None, + references: list[Reference] | None = None, + tags: dict[Any, Any] | None = None, + start_time: float | None = None, + ignore_active_span: bool = False, ) -> MockSpan: ... def extract(self, format: str, carrier: dict[Any, Any]) -> SpanContext: ... diff --git a/stubs/opentracing/opentracing/span.pyi b/stubs/opentracing/opentracing/span.pyi index 74a6dc5d2..0bb1d18dd 100644 --- a/stubs/opentracing/opentracing/span.pyi +++ b/stubs/opentracing/opentracing/span.pyi @@ -17,14 +17,14 @@ class Span: @property def tracer(self) -> Tracer: ... def set_operation_name(self, operation_name: str) -> Self: ... - def finish(self, finish_time: float | None = ...) -> None: ... + def finish(self, finish_time: float | None = None) -> None: ... def set_tag(self, key: str, value: str | bool | float) -> Self: ... - def log_kv(self, key_values: dict[str, Any], timestamp: float | None = ...) -> Self: ... + def log_kv(self, key_values: dict[str, Any], timestamp: float | None = None) -> Self: ... def set_baggage_item(self, key: str, value: str) -> Self: ... def get_baggage_item(self, key: str) -> str | None: ... def __enter__(self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None ) -> None: ... - def log_event(self, event: Any, payload: Incomplete | None = ...) -> Self: ... + def log_event(self, event: Any, payload: Incomplete | None = None) -> Self: ... def log(self, **kwargs: Any) -> Self: ... diff --git a/stubs/opentracing/opentracing/tracer.pyi b/stubs/opentracing/opentracing/tracer.pyi index 6dcc47cd0..275b9d7f6 100644 --- a/stubs/opentracing/opentracing/tracer.pyi +++ b/stubs/opentracing/opentracing/tracer.pyi @@ -5,7 +5,7 @@ from .scope_manager import ScopeManager from .span import Span, SpanContext class Tracer: - def __init__(self, scope_manager: ScopeManager | None = ...) -> None: ... + def __init__(self, scope_manager: ScopeManager | None = None) -> None: ... @property def scope_manager(self) -> ScopeManager: ... @property @@ -13,21 +13,21 @@ class Tracer: def start_active_span( self, operation_name: str, - child_of: Span | SpanContext | None = ..., - references: list[Reference] | None = ..., - tags: dict[Any, Any] | None = ..., - start_time: float | None = ..., - ignore_active_span: bool = ..., - finish_on_close: bool = ..., + child_of: Span | SpanContext | None = None, + references: list[Reference] | None = None, + tags: dict[Any, Any] | None = None, + start_time: float | None = None, + ignore_active_span: bool = False, + finish_on_close: bool = True, ) -> Scope: ... def start_span( self, - operation_name: str | None = ..., - child_of: Span | SpanContext | None = ..., - references: list[Reference] | None = ..., - tags: dict[Any, Any] | None = ..., - start_time: float | None = ..., - ignore_active_span: bool = ..., + operation_name: str | None = None, + child_of: Span | SpanContext | None = None, + references: list[Reference] | None = None, + tags: dict[Any, Any] | None = None, + start_time: float | None = None, + ignore_active_span: bool = False, ) -> Span: ... def inject(self, span_context: SpanContext, format: str, carrier: dict[Any, Any]) -> None: ... def extract(self, format: str, carrier: dict[Any, Any]) -> SpanContext: ... @@ -40,8 +40,8 @@ class Reference(NamedTuple): type: str referenced_context: SpanContext | None -def child_of(referenced_context: SpanContext | None = ...) -> Reference: ... -def follows_from(referenced_context: SpanContext | None = ...) -> Reference: ... +def child_of(referenced_context: SpanContext | None = None) -> Reference: ... +def follows_from(referenced_context: SpanContext | None = None) -> Reference: ... def start_child_span( - parent_span: Span, operation_name: str, tags: dict[Any, Any] | None = ..., start_time: float | None = ... + parent_span: Span, operation_name: str, tags: dict[Any, Any] | None = None, start_time: float | None = None ) -> Span: ...