Skip to content

[oauthlib] Fix type on body argument of oauthlib.oauth1.Client.sign() #14295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 11 additions & 2 deletions stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from _typeshed import Incomplete
from collections.abc import Callable
from collections.abc import Callable, Mapping
from logging import Logger
from typing import Any, Final

from oauthlib.common import _HTTPMethod

log: Logger
SIGNATURE_HMAC_SHA1: Final[str]
SIGNATURE_HMAC_SHA256: Final[str]
Expand Down Expand Up @@ -56,4 +58,11 @@ class Client:
): ...
def get_oauth_signature(self, request): ...
def get_oauth_params(self, request): ...
def sign(self, uri, http_method: str = "GET", body: str | None = None, headers: dict[str, str] | None = None, realm=None): ...
def sign(
self,
uri: str,
http_method: _HTTPMethod = "GET",
body: str | dict[str, str] | list[tuple[str, str]] | None = None,
headers: Mapping[str, str] | None = None,
realm=None,
): ...