Skip to content

Commit

Permalink
static fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Jan 17, 2024
1 parent 8a1f6fd commit a1e99ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scenario/mocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def secret_add(
description: Optional[str] = None,
expire: Optional[datetime.datetime] = None,
rotate: Optional[SecretRotate] = None,
owner: Optional[Literal["unit", "application"]] = None,
owner: Optional[Literal["unit", "app"]] = None,
) -> str:
from scenario.state import Secret

Expand Down
5 changes: 3 additions & 2 deletions scenario/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Secret(_DCBase):

# deprecated! if a secret is not granted to this unit, omit it from State.secrets altogether.
# this attribute will be removed in Scenario 7+
granted: Literal["unit", "app", False] = "<DEPRECATED>"
granted = "<DEPRECATED>"

# what revision is currently tracked by this charm. Only meaningful if owner=False
revision: int = 0
Expand Down Expand Up @@ -245,7 +245,8 @@ def _update_metadata(
):
"""Update the metadata."""
revision = max(self.contents.keys())
self.contents[revision + 1] = content
if content:
self.contents[revision + 1] = content

# bypass frozen dataclass
if label:
Expand Down

0 comments on commit a1e99ca

Please sign in to comment.