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

Commit

Permalink
fix linting and pin deps
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo-seijas committed May 3, 2024
1 parent 4e37c1a commit 990e9fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
22 changes: 13 additions & 9 deletions src/charm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand All @@ -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
Expand Down

0 comments on commit 990e9fc

Please sign in to comment.