Skip to content

Commit 4267229

Browse files
authored
Merge pull request #1412 from burnash/bugfix/client_init
Fixup gspread client init arguments
2 parents f0a8779 + 03a10a5 commit 4267229

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

gspread/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def authorize(
7777
:rtype: :class:`gspread.client.Client`
7878
"""
7979

80-
return Client(auth=credentials, http_client=http_client, session=session)
80+
return Client(auth=credentials, session=session, http_client=http_client)
8181

8282

8383
class FlowCallable(Protocol):

gspread/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class Client:
3838
def __init__(
3939
self,
4040
auth: Credentials,
41-
http_client: HTTPClientType = HTTPClient,
4241
session: Optional[Session] = None,
42+
http_client: HTTPClientType = HTTPClient,
4343
) -> None:
4444
self.http_client = http_client(auth, session)
4545

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def client():
8787
else:
8888
auth_credentials = DummyCredentials(DUMMY_ACCESS_TOKEN)
8989

90-
gc = Client(auth_credentials, BackOffHTTPClient)
90+
gc = Client(auth=auth_credentials, http_client=BackOffHTTPClient)
9191
if not isinstance(gc, gspread.client.Client) is True:
9292
raise AssertionError
9393

0 commit comments

Comments
 (0)