From a55a00182b6f22f9b2dcd17b8de9cbebb60f8490 Mon Sep 17 00:00:00 2001 From: Casey Schneider-Mizell Date: Fri, 25 Oct 2024 15:12:04 -0700 Subject: [PATCH] various ruff linter requests --- caveclient/tools/testing.py | 7 ++++--- tests/conftest.py | 2 -- tests/test_framework.py | 12 ++++++------ tests/test_infoservice.py | 2 +- tests/test_materialization.py | 1 - 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/caveclient/tools/testing.py b/caveclient/tools/testing.py index e31ca603..a71257ef 100644 --- a/caveclient/tools/testing.py +++ b/caveclient/tools/testing.py @@ -1,10 +1,11 @@ import os import warnings -from packaging.version import Version from typing import Optional -from ..frameworkclient import CAVEclient -from .. import endpoints +from packaging.version import Version + +from .. import endpoints +from ..frameworkclient import CAVEclient try: import responses diff --git a/tests/conftest.py b/tests/conftest.py index a9b7bd91..4ece10eb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,8 +7,6 @@ get_server_versions, ) - -# These are convenience functions to get a mix of specified and default values datastack_dict = get_server_information() server_versions = get_server_versions() diff --git a/tests/test_framework.py b/tests/test_framework.py index 8bac5970..0c5162eb 100644 --- a/tests/test_framework.py +++ b/tests/test_framework.py @@ -8,11 +8,11 @@ from .conftest import ( datastack_dict, - global_client, - mat_apiv2_specified_client, + global_client, # noqa: F401 + mat_apiv2_specified_client, # noqa: F401 server_versions, test_info, - version_specified_client, + version_specified_client, # noqa: F401 ) default_mapping = { @@ -33,7 +33,7 @@ info_url = url_template.format_map(mapping) -def test_global_client(global_client): +def test_global_client(global_client): # noqa: F811 assert global_client.info.datastack_name is None assert global_client.info.server_address == datastack_dict["global_server"] assert "Authorization" in global_client.auth.request_header @@ -43,7 +43,7 @@ def test_global_client(global_client): ) -def test_versioned_client(version_specified_client): +def test_versioned_client(version_specified_client): # noqa: F811 correct_date = datetime.datetime.strptime( "2024-06-05T10:10:01.203215", "%Y-%m-%dT%H:%M:%S.%f" ).replace(tzinfo=datetime.timezone.utc) @@ -53,7 +53,7 @@ def test_versioned_client(version_specified_client): assert version_specified_client.chunkedgraph.timestamp == correct_date -def test_api_version(mat_apiv2_specified_client): +def test_api_version(mat_apiv2_specified_client): # noqa: F811 assert "api/v2" in mat_apiv2_specified_client.materialize._endpoints["simple_query"] diff --git a/tests/test_infoservice.py b/tests/test_infoservice.py index 9a565504..85856b3f 100644 --- a/tests/test_infoservice.py +++ b/tests/test_infoservice.py @@ -3,7 +3,7 @@ from caveclient.endpoints import infoservice_endpoints_v2 -from .conftest import test_info, datastack_dict +from .conftest import datastack_dict, test_info def test_info_d(myclient): diff --git a/tests/test_materialization.py b/tests/test_materialization.py index 00010bcf..cfab787b 100644 --- a/tests/test_materialization.py +++ b/tests/test_materialization.py @@ -14,7 +14,6 @@ from caveclient.endpoints import ( chunkedgraph_endpoints_common, materialization_common, - materialization_endpoints_v2, materialization_endpoints_v3, schema_endpoints_v2, )