Skip to content

Commit dd6d7bf

Browse files
authored
[oauthlib] Fix type on body argument of oauthlib.oauth1.Client.sign() (#14295)
1 parent 7cb1ea1 commit dd6d7bf

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

stubs/oauthlib/oauthlib/oauth1/rfc5849/__init__.pyi

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from _typeshed import Incomplete
2-
from collections.abc import Callable
2+
from collections.abc import Callable, Mapping
33
from logging import Logger
44
from typing import Any, Final
55

6+
from oauthlib.common import _HTTPMethod
7+
68
log: Logger
79
SIGNATURE_HMAC_SHA1: Final[str]
810
SIGNATURE_HMAC_SHA256: Final[str]
@@ -56,4 +58,11 @@ class Client:
5658
): ...
5759
def get_oauth_signature(self, request): ...
5860
def get_oauth_params(self, request): ...
59-
def sign(self, uri, http_method: str = "GET", body: str | None = None, headers: dict[str, str] | None = None, realm=None): ...
61+
def sign(
62+
self,
63+
uri: str,
64+
http_method: _HTTPMethod = "GET",
65+
body: str | dict[str, str] | list[tuple[str, str]] | None = None,
66+
headers: Mapping[str, str] | None = None,
67+
realm=None,
68+
): ...

0 commit comments

Comments
 (0)