diff --git a/requirements.txt b/requirements.txt index 5cc3a43..5794e5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cosl -jsonschema >=4.20,<4.21 -ops >= 2.6 -pydantic >= 1.10,<2 +cosl==0.0.11 +jsonschema==4.22.0 +ops==2.12.0 +pydantic==1.10.15 diff --git a/src/charm_state.py b/src/charm_state.py index 10d3f5c..8243657 100644 --- a/src/charm_state.py +++ b/src/charm_state.py @@ -227,9 +227,9 @@ def from_charm( webserver_threads=int(threads) if threads is not None else None, webserver_keepalive=int(keepalive) if keepalive is not None else None, webserver_timeout=int(timeout) if timeout is not None else None, - flask_secret_key=secret_storage.get_flask_secret_key() - if secret_storage.is_initialized - else None, + flask_secret_key=( + secret_storage.get_flask_secret_key() if secret_storage.is_initialized else None + ), is_secret_storage_ready=secret_storage.is_initialized, ) @@ -243,12 +243,16 @@ def webserver_config(self) -> WebserverConfig: return WebserverConfig( workers=self._webserver_workers, threads=self._webserver_threads, - keepalive=datetime.timedelta(seconds=int(self._webserver_keepalive)) - if self._webserver_keepalive is not None - else None, - timeout=datetime.timedelta(seconds=int(self._webserver_timeout)) - if self._webserver_timeout is not None - else None, + keepalive=( + datetime.timedelta(seconds=int(self._webserver_keepalive)) + if self._webserver_keepalive is not None + else None + ), + timeout=( + datetime.timedelta(seconds=int(self._webserver_timeout)) + if self._webserver_timeout is not None + else None + ), ) @property