From 4e37c1ae8c49e137ec5c1fbd6979e613752ff492 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:07:33 +0000 Subject: [PATCH 1/2] chore(deps): update dependency jsonschema to >=4.22,<4.23 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5cc3a43..b1152e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ cosl -jsonschema >=4.20,<4.21 +jsonschema >=4.22,<4.23 ops >= 2.6 pydantic >= 1.10,<2 From 990e9fc2d7e518804f180b4b0ee02910254c697a Mon Sep 17 00:00:00 2001 From: Arturo Seijas Date: Fri, 3 May 2024 11:27:16 +0200 Subject: [PATCH 2/2] fix linting and pin deps --- requirements.txt | 8 ++++---- src/charm_state.py | 22 +++++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/requirements.txt b/requirements.txt index b1152e9..5794e5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cosl -jsonschema >=4.22,<4.23 -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