Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 17, 2023
1 parent f02c67f commit d4ef1de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions platform_disk_api/kube_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def from_primitive(cls, payload: dict[str, Any]) -> "PersistentVolumeClaimRead":
payload["spec"]["resources"]["requests"]["storage"]
),
storage_real=storage_real,
labels=payload["metadata"].get("labels", dict()),
annotations=payload["metadata"].get("annotations", dict()),
labels=payload["metadata"].get("labels", {}),
annotations=payload["metadata"].get("annotations", {}),
)


Expand Down
1 change: 1 addition & 0 deletions tests/integration/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from yarl import URL

from platform_disk_api.config import AuthConfig

from tests.integration.conftest import random_name


Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_usage_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
watch_disk_usage,
watch_lifespan_ended,
)

from tests.integration.kube import KubeClientForTest


Expand Down
12 changes: 6 additions & 6 deletions tests/unit/test_pvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def test_pvc_from_primitive_pending(
phase=PersistentVolumeClaimRead.Phase.PENDING,
storage_requested=storage,
storage_real=None,
labels=dict(),
annotations=dict(),
labels={},
annotations={},
)

@pytest.mark.parametrize(
Expand Down Expand Up @@ -157,8 +157,8 @@ def test_pvc_from_primitive_bound(
phase=PersistentVolumeClaimRead.Phase.BOUND,
storage_requested=storage,
storage_real=2 * storage,
labels=dict(),
annotations=dict(),
labels={},
annotations={},
)

@pytest.mark.parametrize("name,storage_class,storage", [("test", "test-stor", 100)])
Expand Down Expand Up @@ -186,7 +186,7 @@ def test_pvc_from_primitive_with_labels(
storage_requested=storage,
storage_real=2 * storage,
labels=dict(foo="bar"),
annotations=dict(),
annotations={},
)

@pytest.mark.parametrize("name,storage_class,storage", [("test", "test-stor", 100)])
Expand All @@ -213,6 +213,6 @@ def test_pvc_from_primitive_with_annotations(
phase=PersistentVolumeClaimRead.Phase.BOUND,
storage_requested=storage,
storage_real=2 * storage,
labels=dict(),
labels={},
annotations=dict(foo="bar"),
)

0 comments on commit d4ef1de

Please sign in to comment.