Skip to content

Commit

Permalink
various ruff linter requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ceesem committed Oct 25, 2024
1 parent dff8f74 commit a55a001
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
7 changes: 4 additions & 3 deletions caveclient/tools/testing.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
12 changes: 6 additions & 6 deletions tests/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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"]


Expand Down
2 changes: 1 addition & 1 deletion tests/test_infoservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion tests/test_materialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from caveclient.endpoints import (
chunkedgraph_endpoints_common,
materialization_common,
materialization_endpoints_v2,
materialization_endpoints_v3,
schema_endpoints_v2,
)
Expand Down

0 comments on commit a55a001

Please sign in to comment.