Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#180)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Sep 24, 2024
1 parent 074d23f commit ee35a3b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.5.7'
rev: 'v0.6.7'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
7 changes: 4 additions & 3 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import pytest
import requests
from requests import Response

from dvc_studio_client.auth import (
AuthorizationExpiredError,
InvalidScopesError,
check_token_authentication,
get_access_token,
start_device_login,
)
from requests import Response

MOCK_RESPONSE = {
"verification_uri": "https://studio.example.com/auth/device-login",
Expand All @@ -18,7 +19,7 @@
}


@pytest.fixture()
@pytest.fixture
def mock_response(mocker):
def _mock_response(status_code, json):
response = Response()
Expand All @@ -29,7 +30,7 @@ def _mock_response(status_code, json):
return _mock_response


@pytest.fixture()
@pytest.fixture
def mock_post(mocker, mock_response):
def _mock_post(method, side_effect):
return mocker.patch(
Expand Down
1 change: 1 addition & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest
from dulwich.porcelain import clone, init

from dvc_studio_client import DEFAULT_STUDIO_URL
from dvc_studio_client.config import _get_remote_url, get_studio_config
from dvc_studio_client.env import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_model_registry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from dvc_studio_client.env import DVC_STUDIO_TOKEN, DVC_STUDIO_URL
from dvc_studio_client.model_registry import get_download_uris

Expand Down
3 changes: 2 additions & 1 deletion tests/test_post_live_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from unittest.mock import DEFAULT, MagicMock

import pytest
from requests import RequestException

from dvc_studio_client import DEFAULT_STUDIO_URL
from dvc_studio_client.env import (
DVC_STUDIO_REPO_URL,
Expand All @@ -16,7 +18,6 @@
get_studio_token_and_repo_url,
post_live_metrics,
)
from requests import RequestException


def test_post_live_metrics_skip_on_missing_token(caplog):
Expand Down

0 comments on commit ee35a3b

Please sign in to comment.