From 183499c359fc37dd13f9df7539f79e8777811fd2 Mon Sep 17 00:00:00 2001 From: Lucain Pouget Date: Mon, 25 Nov 2024 17:49:18 +0100 Subject: [PATCH] Fix lint after ruff update --- tests/test_auth_cli.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_auth_cli.py b/tests/test_auth_cli.py index d9013b44ff..52a2c20a7b 100644 --- a/tests/test_auth_cli.py +++ b/tests/test_auth_cli.py @@ -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 @@ -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()