From e6d9e2f8e236e85466c48c62478df8f58d2ee32a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:44:39 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#795) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/Zac-HD/shed: 2024.1.1 → 2024.3.1](https://github.com/Zac-HD/shed/compare/2024.1.1...2024.3.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- platform_registry_api/config.py | 26 ++++++++++++++------------ tests/integration/test_api.py | 1 - tests/integration/test_basic.py | 1 - 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b709236..a136b282 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: - --futures=true - repo: https://github.com/Zac-HD/shed - rev: 2024.1.1 + rev: 2024.3.1 hooks: - id: shed args: diff --git a/platform_registry_api/config.py b/platform_registry_api/config.py index f973b2f6..6d31b081 100644 --- a/platform_registry_api/config.py +++ b/platform_registry_api/config.py @@ -120,26 +120,28 @@ def create_upstream_registry(self) -> UpstreamRegistryConfig: upstream_type = UpstreamType( self._environ.get("NP_REGISTRY_UPSTREAM_TYPE", UpstreamType.OAUTH.value) ) - upstream: dict[str, Any] = dict( - endpoint_url=endpoint_url, - project=project, - max_catalog_entries=max_catalog_entries, - type=upstream_type, - ) + upstream: dict[str, Any] = { + "endpoint_url": endpoint_url, + "project": project, + "max_catalog_entries": max_catalog_entries, + "type": upstream_type, + } if upstream_type == UpstreamType.OAUTH: upstream.update( - dict( - token_endpoint_url=URL( + { + "token_endpoint_url": URL( self._environ["NP_REGISTRY_UPSTREAM_TOKEN_URL"] ), - token_service=self._environ["NP_REGISTRY_UPSTREAM_TOKEN_SERVICE"], - token_endpoint_username=self._environ[ + "token_service": self._environ[ + "NP_REGISTRY_UPSTREAM_TOKEN_SERVICE" + ], + "token_endpoint_username": self._environ[ "NP_REGISTRY_UPSTREAM_TOKEN_USERNAME" ], - token_endpoint_password=self._environ[ + "token_endpoint_password": self._environ[ "NP_REGISTRY_UPSTREAM_TOKEN_PASSWORD" ], - ) + } ) if "NP_REGISTRY_UPSTREAM_TOKEN_REGISTRY_SCOPE" in self._environ: upstream["token_registry_catalog_scope"] = self._environ[ diff --git a/tests/integration/test_api.py b/tests/integration/test_api.py index f004520a..a5411cdf 100644 --- a/tests/integration/test_api.py +++ b/tests/integration/test_api.py @@ -11,7 +11,6 @@ ServerConfig, UpstreamRegistryConfig, ) - from tests import _TestClientFactory from tests.integration.conftest import _User diff --git a/tests/integration/test_basic.py b/tests/integration/test_basic.py index bfa1fc39..60abcbe0 100644 --- a/tests/integration/test_basic.py +++ b/tests/integration/test_basic.py @@ -28,7 +28,6 @@ UpstreamRegistryConfig, UpstreamType, ) - from tests import _TestClientFactory from tests.integration.conftest import _User