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
30 changes: 30 additions & 0 deletions stubs/oauthlib/oauthlib/common.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,36 @@ class Request:
decoded_body: list[tuple[str, str]] | None
oauth_params: list[str]
validator_log: dict[str, Any] # value type depends on the key
access_token: Incomplete | None
client: Incomplete | None
client_id: Incomplete | None
client_secret: Incomplete | None
code: Incomplete | None
code_challenge: Incomplete | None
code_challenge_method: Incomplete | None
code_verifier: Incomplete | None
extra_credentials: Incomplete | None
grant_type: Incomplete | None
redirect_uri: Incomplete | None
refresh_token: Incomplete | None
request_token: Incomplete | None
response_type: Incomplete | None
scope: Incomplete | None
scopes: Incomplete | None
state: Incomplete | None
token: Incomplete | None
user: Incomplete | None
token_type_hint: Incomplete | None
response_mode: Incomplete | None
nonce: Incomplete | None
display: Incomplete | None
prompt: Incomplete | None
claims: Incomplete | None
max_age: Incomplete | None
ui_locales: Incomplete | None
id_token_hint: Incomplete | None
login_hint: Incomplete | None
acr_values: Incomplete | None
def __init__(
self,
uri: str,
Expand Down
30 changes: 15 additions & 15 deletions stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from collections.abc import Callable, Mapping
from logging import Logger
from typing import Any, Final
from typing import Final

from oauthlib.common import _HTTPMethod

Expand All @@ -25,20 +25,20 @@ class Client:
SIGNATURE_METHODS: dict[str, Callable[[str, Incomplete], str]]
@classmethod
def register_signature_method(cls, method_name, method_callback) -> None: ...
client_key: Any
client_secret: Any
resource_owner_key: Any
resource_owner_secret: Any
signature_method: Any
signature_type: Any
callback_uri: Any
rsa_key: Any
verifier: Any
realm: Any
encoding: Any
decoding: Any
nonce: Any
timestamp: Any
client_key: Incomplete
client_secret: Incomplete
resource_owner_key: Incomplete
resource_owner_secret: Incomplete
signature_method: Incomplete
signature_type: Incomplete
callback_uri: Incomplete
rsa_key: Incomplete
verifier: Incomplete
realm: Incomplete
encoding: Incomplete
decoding: Incomplete
nonce: Incomplete
timestamp: Incomplete
def __init__(
self,
client_key: str,
Expand Down
6 changes: 3 additions & 3 deletions stubs/oauthlib/oauthlib/oauth1/rfc5849/endpoints/base.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete

class BaseEndpoint:
request_validator: Any
token_generator: Any
request_validator: Incomplete
token_generator: Incomplete
def __init__(self, request_validator, token_generator=None) -> None: ...
8 changes: 4 additions & 4 deletions stubs/oauthlib/oauthlib/oauth1/rfc5849/errors.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Any
from _typeshed import Incomplete

class OAuth1Error(Exception):
error: Any
error: Incomplete
description: str
uri: Any
status_code: Any
uri: Incomplete
status_code: Incomplete
def __init__(self, description=None, uri=None, status_code: int = 400, request=None) -> None: ...
def in_uri(self, uri): ...
@property
Expand Down
4 changes: 1 addition & 3 deletions stubs/oauthlib/oauthlib/oauth1/rfc5849/parameters.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from _typeshed import Incomplete

def prepare_headers(params, headers: Incomplete | None = ..., realm: Incomplete | None = ...): ...
def prepare_headers(params, headers=None, realm=None): ...
def prepare_form_encoded_body(oauth_params, body): ...
def prepare_request_uri_query(oauth_params, uri): ...
8 changes: 4 additions & 4 deletions stubs/oauthlib/oauthlib/oauth1/rfc5849/utils.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from collections.abc import Callable, Iterable
from typing import Any, Final, TypeVar
from typing import Final, TypeVar

_T = TypeVar("_T")

UNICODE_ASCII_CHARACTER_SET: Final[str]

def filter_params(
target: Callable[[dict[str, Any] | Iterable[tuple[str, Any]], _T], object],
target: Callable[[dict[str, object] | Iterable[tuple[str, object]], _T], object],
) -> Callable[[list[str], _T], object]: ...
def filter_oauth_params(
params: dict[str, Any] | Iterable[tuple[str, Any]],
) -> list[str]: ... # we don't care about second (Any) part
params: dict[str, object] | Iterable[tuple[str, object]],
) -> list[str]: ... # we don't care about second (object) part
def escape(u: str) -> str: ...
def unescape(u: str) -> str: ...
def parse_keqv_list(l: list[str]) -> dict[str, str]: ...
Expand Down
4 changes: 2 additions & 2 deletions stubs/oauthlib/oauthlib/oauth2/rfc6749/errors.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from typing import Any, NoReturn
from typing import NoReturn

from oauthlib.common import Request

Expand All @@ -11,7 +11,7 @@ class OAuth2Error(Exception):
state: str | None
redirect_uri: str | None
client_id: str | None
scopes: Any
scopes: Incomplete | None
response_type: str | None
response_mode: str | None
grant_type: str | None
Expand Down
18 changes: 9 additions & 9 deletions stubs/oauthlib/oauthlib/signals.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete

signals_available: bool

Expand All @@ -7,14 +7,14 @@ class Namespace:

class _FakeSignal:
name: str
__doc__: Any
__doc__: str | None
def __init__(self, name: str, doc: str | None = None) -> None: ...
send: Any
connect: Any
disconnect: Any
has_receivers_for: Any
receivers_for: Any
temporarily_connected_to: Any
connected_to: Any
send: Incomplete
connect: Incomplete
disconnect: Incomplete
has_receivers_for: Incomplete
receivers_for: Incomplete
temporarily_connected_to: Incomplete
connected_to: Incomplete

scope_changed: _FakeSignal
Loading