Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Tell type checkers that the config options are strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Apr 11, 2024
1 parent 697c961 commit 8554612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _get_external_hostname(self) -> str:
Returns:
The assigned hostname.
"""
hostname = self.config["external_hostname"]
hostname = typing.cast(str, self.config["external_hostname"])
if hostname == "":
hostname = self.app.name
return hostname
Expand Down Expand Up @@ -459,7 +459,7 @@ def _make_pod_env(self) -> Union[dict, bool, set, str]:
Returns:
A dictionary used for envConfig in podspec.
"""
env = self.model.config["environment"]
env = typing.cast(str, self.model.config["environment"])

if not env:
return {}
Expand Down

0 comments on commit 8554612

Please sign in to comment.