diff --git a/conda-store-server/conda_store_server/_internal/action/download_packages.py b/conda-store-server/conda_store_server/_internal/action/download_packages.py index 909b528b3..68097512e 100644 --- a/conda-store-server/conda_store_server/_internal/action/download_packages.py +++ b/conda-store-server/conda_store_server/_internal/action/download_packages.py @@ -14,7 +14,6 @@ import conda_package_handling.api import conda_package_streaming.url import filelock - from conda.base.constants import PACKAGE_CACHE_MAGIC_FILE from conda.common.path import expand, strip_pkg_extension from conda.core.package_cache_data import ( diff --git a/conda-store-server/conda_store_server/_internal/action/generate_lockfile.py b/conda-store-server/conda_store_server/_internal/action/generate_lockfile.py index 8efa1c956..cb36ffda4 100644 --- a/conda-store-server/conda_store_server/_internal/action/generate_lockfile.py +++ b/conda-store-server/conda_store_server/_internal/action/generate_lockfile.py @@ -8,7 +8,6 @@ import typing import yaml - from conda_lock.conda_lock import run_lock from conda_store_server._internal import action, conda_utils, schema, utils diff --git a/conda-store-server/conda_store_server/_internal/alembic/env.py b/conda-store-server/conda_store_server/_internal/alembic/env.py index a042ac491..80a4f298e 100644 --- a/conda-store-server/conda_store_server/_internal/alembic/env.py +++ b/conda-store-server/conda_store_server/_internal/alembic/env.py @@ -7,7 +7,6 @@ from alembic import context from sqlalchemy import engine_from_config, pool - # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config diff --git a/conda-store-server/conda_store_server/_internal/build.py b/conda-store-server/conda_store_server/_internal/build.py index bc7021372..50d4be82a 100644 --- a/conda-store-server/conda_store_server/_internal/build.py +++ b/conda-store-server/conda_store_server/_internal/build.py @@ -13,7 +13,6 @@ import typing import yaml - from filelock import FileLock from sqlalchemy.orm import Session diff --git a/conda-store-server/conda_store_server/_internal/dbutil.py b/conda-store-server/conda_store_server/_internal/dbutil.py index 8f5d0e645..39835dd8d 100644 --- a/conda-store-server/conda_store_server/_internal/dbutil.py +++ b/conda-store-server/conda_store_server/_internal/dbutil.py @@ -4,7 +4,6 @@ import json import os - from contextlib import contextmanager from functools import partial from tempfile import TemporaryDirectory @@ -15,7 +14,6 @@ from conda_store_server._internal import utils - _here = os.path.abspath(os.path.dirname(__file__)) ALEMBIC_INI_TEMPLATE_PATH = os.path.join(_here, "alembic.ini") diff --git a/conda-store-server/conda_store_server/_internal/environment.py b/conda-store-server/conda_store_server/_internal/environment.py index b0803565b..0b2df2b55 100644 --- a/conda-store-server/conda_store_server/_internal/environment.py +++ b/conda-store-server/conda_store_server/_internal/environment.py @@ -6,7 +6,6 @@ import pydantic import yaml - from sqlalchemy import and_, or_ from sqlalchemy.orm import Query diff --git a/conda-store-server/conda_store_server/_internal/orm.py b/conda-store-server/conda_store_server/_internal/orm.py index 8a2cdbb5a..adfffed88 100644 --- a/conda-store-server/conda_store_server/_internal/orm.py +++ b/conda-store-server/conda_store_server/_internal/orm.py @@ -9,7 +9,6 @@ import pathlib import shutil import sys - from functools import partial from sqlalchemy import ( @@ -42,7 +41,6 @@ from conda_store_server._internal import conda_utils, schema, utils from conda_store_server._internal.environment import validate_environment - logger = logging.getLogger("orm") Base = declarative_base() diff --git a/conda-store-server/conda_store_server/_internal/server/__main__.py b/conda-store-server/conda_store_server/_internal/server/__main__.py index de686f229..2af976239 100644 --- a/conda-store-server/conda_store_server/_internal/server/__main__.py +++ b/conda-store-server/conda_store_server/_internal/server/__main__.py @@ -4,7 +4,6 @@ from conda_store_server._internal.server.app import CondaStoreServer - main = CondaStoreServer.launch_instance if __name__ == "__main__": diff --git a/conda-store-server/conda_store_server/_internal/server/views/api.py b/conda-store-server/conda_store_server/_internal/server/views/api.py index 45e3ed993..927c8229c 100644 --- a/conda-store-server/conda_store_server/_internal/server/views/api.py +++ b/conda-store-server/conda_store_server/_internal/server/views/api.py @@ -3,12 +3,10 @@ # license that can be found in the LICENSE file. import datetime - from typing import Any, Dict, List, Optional, TypedDict import pydantic import yaml - from celery.result import AsyncResult from fastapi import APIRouter, Body, Depends, HTTPException, Query, Request from fastapi.responses import PlainTextResponse, RedirectResponse diff --git a/conda-store-server/conda_store_server/_internal/server/views/conda_store_ui.py b/conda-store-server/conda_store_server/_internal/server/views/conda_store_ui.py index ece7d8a74..5b58c5b31 100644 --- a/conda-store-server/conda_store_server/_internal/server/views/conda_store_ui.py +++ b/conda-store-server/conda_store_server/_internal/server/views/conda_store_ui.py @@ -6,7 +6,6 @@ from conda_store_server.server import dependencies - router_conda_store_ui = APIRouter(tags=["conda-store-ui"]) diff --git a/conda-store-server/conda_store_server/_internal/server/views/metrics.py b/conda-store-server/conda_store_server/_internal/server/views/metrics.py index 5c705ec51..9b298faf5 100644 --- a/conda-store-server/conda_store_server/_internal/server/views/metrics.py +++ b/conda-store-server/conda_store_server/_internal/server/views/metrics.py @@ -8,7 +8,6 @@ from conda_store_server import api from conda_store_server.server import dependencies - router_metrics = APIRouter(tags=["metrics"]) diff --git a/conda-store-server/conda_store_server/_internal/server/views/registry.py b/conda-store-server/conda_store_server/_internal/server/views/registry.py index 7de6496cc..40bf797b5 100644 --- a/conda-store-server/conda_store_server/_internal/server/views/registry.py +++ b/conda-store-server/conda_store_server/_internal/server/views/registry.py @@ -13,7 +13,6 @@ from conda_store_server._internal.schema import Permissions from conda_store_server.server import dependencies - router_registry = APIRouter(tags=["registry"]) diff --git a/conda-store-server/conda_store_server/_internal/utils.py b/conda-store-server/conda_store_server/_internal/utils.py index e2688bc62..1ad717202 100644 --- a/conda-store-server/conda_store_server/_internal/utils.py +++ b/conda-store-server/conda_store_server/_internal/utils.py @@ -11,7 +11,6 @@ import subprocess import sys import time - from typing import AnyStr from filelock import FileLock diff --git a/conda-store-server/conda_store_server/_internal/worker/__main__.py b/conda-store-server/conda_store_server/_internal/worker/__main__.py index 3238b135a..00e78aa70 100644 --- a/conda-store-server/conda_store_server/_internal/worker/__main__.py +++ b/conda-store-server/conda_store_server/_internal/worker/__main__.py @@ -4,7 +4,6 @@ from conda_store_server._internal.worker.app import CondaStoreWorker - main = CondaStoreWorker.launch_instance if __name__ == "__main__": diff --git a/conda-store-server/conda_store_server/_internal/worker/tasks.py b/conda-store-server/conda_store_server/_internal/worker/tasks.py index 4dd727940..78c9a60d8 100644 --- a/conda-store-server/conda_store_server/_internal/worker/tasks.py +++ b/conda-store-server/conda_store_server/_internal/worker/tasks.py @@ -9,7 +9,6 @@ import typing import yaml - from celery import Task, platforms, shared_task from celery.execute import send_task from celery.signals import worker_ready diff --git a/conda-store-server/conda_store_server/server/auth.py b/conda-store-server/conda_store_server/server/auth.py index c16ffecf8..28572de37 100644 --- a/conda-store-server/conda_store_server/server/auth.py +++ b/conda-store-server/conda_store_server/server/auth.py @@ -6,14 +6,12 @@ import datetime import re import secrets - from collections import defaultdict from typing import Iterable, Optional, Set import jwt import requests import yarl - from fastapi import APIRouter, Depends, HTTPException, Request, Response from fastapi.encoders import jsonable_encoder from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse diff --git a/conda-store-server/conda_store_server/storage.py b/conda-store-server/conda_store_server/storage.py index c72e2e06e..f0d52146e 100644 --- a/conda-store-server/conda_store_server/storage.py +++ b/conda-store-server/conda_store_server/storage.py @@ -8,7 +8,6 @@ import shutil import minio - from minio.credentials.providers import Provider from traitlets import Bool, Dict, List, Type, Unicode from traitlets.config import LoggingConfigurable diff --git a/conda-store-server/tests/_internal/action/test_actions.py b/conda-store-server/tests/_internal/action/test_actions.py index 2fd810bce..7fadb0ffa 100644 --- a/conda-store-server/tests/_internal/action/test_actions.py +++ b/conda-store-server/tests/_internal/action/test_actions.py @@ -8,13 +8,11 @@ import re import sys import tempfile - from unittest import mock import pytest import yaml import yarl - from celery.result import AsyncResult from conda.base.context import context as conda_base_context from constructor import construct diff --git a/conda-store-server/tests/_internal/test_utils.py b/conda-store-server/tests/_internal/test_utils.py index a1a0bafe9..629fa83be 100644 --- a/conda-store-server/tests/_internal/test_utils.py +++ b/conda-store-server/tests/_internal/test_utils.py @@ -4,7 +4,6 @@ from conda_store_server._internal.utils import disk_usage, du - # TODO: Add tests for the other functions in utils.py diff --git a/conda-store-server/tests/test_app.py b/conda-store-server/tests/test_app.py index 1cda3d628..36c8deff6 100644 --- a/conda-store-server/tests/test_app.py +++ b/conda-store-server/tests/test_app.py @@ -5,7 +5,6 @@ import sys import pytest - from celery.result import AsyncResult from conda_store_server import api diff --git a/conda-store-server/tests/test_traitlets.py b/conda-store-server/tests/test_traitlets.py index 306450247..493c5c191 100644 --- a/conda-store-server/tests/test_traitlets.py +++ b/conda-store-server/tests/test_traitlets.py @@ -6,7 +6,6 @@ import tempfile import pytest - from fastapi.templating import Jinja2Templates from fastapi.testclient import TestClient diff --git a/conda-store-server/tests/user_journeys/test_user_journeys.py b/conda-store-server/tests/user_journeys/test_user_journeys.py index 950cac411..b59e1fd38 100644 --- a/conda-store-server/tests/user_journeys/test_user_journeys.py +++ b/conda-store-server/tests/user_journeys/test_user_journeys.py @@ -61,9 +61,7 @@ def test_admin_login_and_delete_shared_environment( environment = api.create_environment( namespace, specification_path, - ).json()["data"][ - "specification" - ]["name"] + ).json()["data"]["specification"]["name"] api.delete_environment(namespace, environment) api.delete_namespace(namespace) @@ -91,17 +89,13 @@ def test_user_login_and_create_shared_environment( token=api.create_token( namespace, "developer", - ).json()[ - "data" - ]["token"], + ).json()["data"]["token"], ) environment = dev_api.create_environment( namespace, specification_path, - ).json()[ - "data" - ]["specification"]["name"] + ).json()["data"]["specification"]["name"] api.delete_environment(namespace, environment) api.delete_namespace(namespace) @@ -139,9 +133,7 @@ def test_admin_set_active_build(base_url: str): assert api.get_environment( namespace=namespace, environment=environment, - )[ - "current_build_id" - ] == max(build_ids) + )["current_build_id"] == max(build_ids) api.set_active_build( namespace=namespace, environment=environment, build_id=min(build_ids) @@ -150,9 +142,7 @@ def test_admin_set_active_build(base_url: str): assert api.get_environment( namespace=namespace, environment=environment, - )[ - "current_build_id" - ] == min(build_ids) + )["current_build_id"] == min(build_ids) for env in envs: api.delete_environment(namespace, env)