From 5dfe8e353370dc37b83a9bf2878b224b4d355911 Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Mon, 9 Dec 2024 10:34:49 +0100 Subject: [PATCH] fix imports --- .../api_keys/_exceptions_handlers.py | 2 +- .../src/simcore_service_webserver/api_keys/_rest.py | 8 +++----- .../src/simcore_service_webserver/api_keys/_rpc.py | 9 +++++---- .../src/simcore_service_webserver/api_keys/_service.py | 7 ++++--- .../src/simcore_service_webserver/api_keys/plugin.py | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/services/web/server/src/simcore_service_webserver/api_keys/_exceptions_handlers.py b/services/web/server/src/simcore_service_webserver/api_keys/_exceptions_handlers.py index 83a318b2e55..eaecf327714 100644 --- a/services/web/server/src/simcore_service_webserver/api_keys/_exceptions_handlers.py +++ b/services/web/server/src/simcore_service_webserver/api_keys/_exceptions_handlers.py @@ -1,5 +1,4 @@ from servicelib.aiohttp import status -from simcore_service_webserver.api_keys.errors import ApiKeyNotFoundError from ..exception_handling import ( ExceptionToHttpErrorMap, @@ -7,6 +6,7 @@ exception_handling_decorator, to_exceptions_handlers_map, ) +from .errors import ApiKeyNotFoundError _TO_HTTP_ERROR_MAP: ExceptionToHttpErrorMap = { ApiKeyNotFoundError: HttpErrorInfo( diff --git a/services/web/server/src/simcore_service_webserver/api_keys/_rest.py b/services/web/server/src/simcore_service_webserver/api_keys/_rest.py index 277081f4dc7..c3b81c63cd3 100644 --- a/services/web/server/src/simcore_service_webserver/api_keys/_rest.py +++ b/services/web/server/src/simcore_service_webserver/api_keys/_rest.py @@ -16,17 +16,15 @@ parse_request_body_as, parse_request_path_parameters_as, ) -from simcore_service_webserver.api_keys import _service -from simcore_service_webserver.api_keys._exceptions_handlers import ( - handle_plugin_requests_exceptions, -) -from simcore_service_webserver.api_keys._models import ApiKey from .._meta import API_VTAG from ..login.decorators import login_required from ..models import RequestContext from ..security.decorators import permission_required from ..utils_aiohttp import envelope_json_response +from . import _service +from ._exceptions_handlers import handle_plugin_requests_exceptions +from ._models import ApiKey _logger = logging.getLogger(__name__) diff --git a/services/web/server/src/simcore_service_webserver/api_keys/_rpc.py b/services/web/server/src/simcore_service_webserver/api_keys/_rpc.py index 97af4adc13b..4f035334af8 100644 --- a/services/web/server/src/simcore_service_webserver/api_keys/_rpc.py +++ b/services/web/server/src/simcore_service_webserver/api_keys/_rpc.py @@ -7,10 +7,11 @@ from models_library.rpc_auth_api_keys import ApiKeyGet from models_library.users import UserID from servicelib.rabbitmq import RPCRouter -from simcore_service_webserver.api_keys import _service -from simcore_service_webserver.api_keys._models import ApiKey -from simcore_service_webserver.api_keys.errors import ApiKeyNotFoundError -from simcore_service_webserver.rabbitmq import get_rabbitmq_rpc_server + +from ..rabbitmq import get_rabbitmq_rpc_server +from . import _service +from ._models import ApiKey +from .errors import ApiKeyNotFoundError router = RPCRouter() diff --git a/services/web/server/src/simcore_service_webserver/api_keys/_service.py b/services/web/server/src/simcore_service_webserver/api_keys/_service.py index 9632f58b27c..4d7cdcb43dc 100644 --- a/services/web/server/src/simcore_service_webserver/api_keys/_service.py +++ b/services/web/server/src/simcore_service_webserver/api_keys/_service.py @@ -7,9 +7,10 @@ from models_library.products import ProductName from models_library.users import UserID from servicelib.utils_secrets import generate_token_secret_key -from simcore_service_webserver.api_keys import _repository -from simcore_service_webserver.api_keys._models import ApiKey -from simcore_service_webserver.api_keys.errors import ApiKeyNotFoundError + +from . import _repository +from ._models import ApiKey +from .errors import ApiKeyNotFoundError _PUNCTUATION_REGEX = re.compile( pattern="[" + re.escape(string.punctuation.replace("_", "")) + "]" diff --git a/services/web/server/src/simcore_service_webserver/api_keys/plugin.py b/services/web/server/src/simcore_service_webserver/api_keys/plugin.py index d34c9ddd905..9c8cc742c23 100644 --- a/services/web/server/src/simcore_service_webserver/api_keys/plugin.py +++ b/services/web/server/src/simcore_service_webserver/api_keys/plugin.py @@ -2,13 +2,13 @@ from aiohttp import web from servicelib.aiohttp.application_setup import ModuleCategory, app_module_setup -from simcore_service_webserver.api_keys import _rest, _rpc from .._constants import APP_SETTINGS_KEY from ..db.plugin import setup_db from ..products.plugin import setup_products from ..rabbitmq import setup_rabbitmq from ..rest.plugin import setup_rest +from . import _rest, _rpc _logger = logging.getLogger(__name__)