Skip to content

Commit

Permalink
type cast base img
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed May 16, 2024
1 parent 706b33e commit 9b5690f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/charm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def from_charm(cls, charm: CharmBase) -> "BaseImage":
Returns:
The base image configuration of the charm.
"""
image_name = charm.config.get(BASE_IMAGE_CONFIG_NAME, "jammy").lower().strip()
image_name = cast(str, charm.config.get(BASE_IMAGE_CONFIG_NAME, "jammy")).lower().strip()
if image_name in LTS_IMAGE_VERSION_TAG_MAP:
return cls(LTS_IMAGE_VERSION_TAG_MAP[image_name])
return cls(image_name)
Expand Down

0 comments on commit 9b5690f

Please sign in to comment.