Skip to content

Commit 7dc41b1

Browse files
authored
Fix lint after ruff update (#2680)
* Fix lint after ruff update * fixing?
1 parent 4e90bf3 commit 7dc41b1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/test_auth_cli.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ def mock_stored_tokens():
5757
"token2": "hf_5678",
5858
"active_token": "hf_9012",
5959
}
60-
with patch("huggingface_hub._login.get_stored_tokens", return_value=stored_tokens), patch(
61-
"huggingface_hub.utils._auth.get_stored_tokens", return_value=stored_tokens
62-
):
63-
yield stored_tokens
60+
with patch("huggingface_hub._login.get_stored_tokens", return_value=stored_tokens):
61+
with patch("huggingface_hub.utils._auth.get_stored_tokens", return_value=stored_tokens):
62+
yield stored_tokens
6463

6564

6665
def assert_in_logs(caplog: LogCaptureFixture, expected_output):
@@ -89,10 +88,9 @@ def test_login_command_with_git(mock_whoami_api_call, caplog: LogCaptureFixture)
8988
args = type("Args", (), {"token": MOCK_TOKEN, "add_to_git_credential": True})()
9089
cmd = LoginCommand(args)
9190

92-
with patch("huggingface_hub._login._is_git_credential_helper_configured", return_value=True), patch(
93-
"huggingface_hub.utils.set_git_credential"
94-
):
95-
cmd.run()
91+
with patch("huggingface_hub._login._is_git_credential_helper_configured", return_value=True):
92+
with patch("huggingface_hub.utils.set_git_credential"):
93+
cmd.run()
9694

9795
assert_in_logs(caplog, "Login successful")
9896
assert_in_logs(caplog, "Your token has been saved in your configured git credential helpers")

0 commit comments

Comments
 (0)