Skip to content

Commit

Permalink
Fix lint after ruff update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Nov 25, 2024
1 parent 4e90bf3 commit 183499c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_auth_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def mock_stored_tokens():
"token2": "hf_5678",
"active_token": "hf_9012",
}
with patch("huggingface_hub._login.get_stored_tokens", return_value=stored_tokens), patch(
"huggingface_hub.utils._auth.get_stored_tokens", return_value=stored_tokens
with (
patch("huggingface_hub._login.get_stored_tokens", return_value=stored_tokens),
patch("huggingface_hub.utils._auth.get_stored_tokens", return_value=stored_tokens),
):
yield stored_tokens

Expand Down Expand Up @@ -89,8 +90,9 @@ def test_login_command_with_git(mock_whoami_api_call, caplog: LogCaptureFixture)
args = type("Args", (), {"token": MOCK_TOKEN, "add_to_git_credential": True})()
cmd = LoginCommand(args)

with patch("huggingface_hub._login._is_git_credential_helper_configured", return_value=True), patch(
"huggingface_hub.utils.set_git_credential"
with (
patch("huggingface_hub._login._is_git_credential_helper_configured", return_value=True),
patch("huggingface_hub.utils.set_git_credential"),
):
cmd.run()

Expand Down

0 comments on commit 183499c

Please sign in to comment.