Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#795)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/Zac-HD/shed: 2024.1.1 → 2024.3.1](Zac-HD/shed@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>
  • Loading branch information
pre-commit-ci[bot] committed Mar 18, 2024
1 parent 9bd3aaa commit e6d9e2f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 14 additions & 12 deletions platform_registry_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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[
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
ServerConfig,
UpstreamRegistryConfig,
)

from tests import _TestClientFactory
from tests.integration.conftest import _User

Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
UpstreamRegistryConfig,
UpstreamType,
)

from tests import _TestClientFactory
from tests.integration.conftest import _User

Expand Down

0 comments on commit e6d9e2f

Please sign in to comment.