Skip to content

Commit

Permalink
fix static-lib check
Browse files Browse the repository at this point in the history
  • Loading branch information
Abuelodelanada committed May 1, 2024
1 parent b083c0c commit b363e75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/charms/observability_libs/v1/cert_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CertHandlerEvents(ObjectEvents):
class _VaultBackend(abc.ABC):
def store(self, contents: Dict[str, str], clear: bool = False): ...

def get_value(self, key: str) -> str: ...
def get_value(self, key: str) -> Optional[str]: ...

def retrieve(self) -> Dict[str, str]: ...

Expand All @@ -116,7 +116,7 @@ def __init__(self, charm: CharmBase, relation_name: str, nest_under: str = "secr

def _check_ready(self):
try:
self.charm.model.get_relation(self.relation_name).data[self.charm.unit]
self.charm.model.get_relation(self.relation_name).data[self.charm.unit] # pyright: ignore
except Exception as e:
# if something goes wrong here, the peer-backed vault is not ready to operate
# it can be because you are trying to use it too soon, i.e. before the peer
Expand All @@ -131,7 +131,7 @@ def _relation(self) -> Optional[Relation]:
@property
def _databag(self):
self._check_ready()
return self._relation.data[self.charm.unit]
return self._relation.data[self.charm.unit] # pyright: ignore

def _read(self) -> Dict[str, str]:
value = self._databag.get(self.nest_under)
Expand Down

0 comments on commit b363e75

Please sign in to comment.