Skip to content

Commit

Permalink
Merge pull request #1412 from burnash/bugfix/client_init
Browse files Browse the repository at this point in the history
Fixup gspread client init arguments
  • Loading branch information
lavigne958 authored Feb 14, 2024
2 parents f0a8779 + 03a10a5 commit 4267229
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gspread/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def authorize(
:rtype: :class:`gspread.client.Client`
"""

return Client(auth=credentials, http_client=http_client, session=session)
return Client(auth=credentials, session=session, http_client=http_client)


class FlowCallable(Protocol):
Expand Down
2 changes: 1 addition & 1 deletion gspread/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Client:
def __init__(
self,
auth: Credentials,
http_client: HTTPClientType = HTTPClient,
session: Optional[Session] = None,
http_client: HTTPClientType = HTTPClient,
) -> None:
self.http_client = http_client(auth, session)

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def client():
else:
auth_credentials = DummyCredentials(DUMMY_ACCESS_TOKEN)

gc = Client(auth_credentials, BackOffHTTPClient)
gc = Client(auth=auth_credentials, http_client=BackOffHTTPClient)
if not isinstance(gc, gspread.client.Client) is True:
raise AssertionError

Expand Down

0 comments on commit 4267229

Please sign in to comment.