pre-commit run -a

This commit is contained in:
Iván Todorovich
2026-05-20 09:50:57 -03:00
parent 6d93fbffac
commit a9e4d6b102
14 changed files with 26 additions and 29 deletions
+2 -3
View File
@@ -72,15 +72,14 @@ def purge_fs_sessions(path):
if is_true(os.environ.get("ODOO_SESSION_REDIS")):
if sentinel_host:
_logger.debug(
"HTTP sessions stored in Redis with prefix '%s'. "
"Using Sentinel on %s:%s",
"HTTP sessions stored in Redis with prefix '%s'. Using Sentinel on %s:%s",
prefix or "",
sentinel_host,
sentinel_port,
)
else:
_logger.debug(
"HTTP sessions stored in Redis with prefix '%s' on " "%s:%s",
"HTTP sessions stored in Redis with prefix '%s' on %s:%s",
prefix or "",
host,
port,
+2 -2
View File
@@ -60,7 +60,7 @@ class RedisSessionStore(SessionStore):
else:
user_msg = "anonymous user"
_logger.debug(
"saving session with key '%s' and " "expiration of %s seconds for %s",
"saving session with key '%s' and expiration of %s seconds for %s",
key,
expiration,
user_msg,
@@ -80,7 +80,7 @@ class RedisSessionStore(SessionStore):
def get(self, sid):
if not self.is_valid_key(sid):
_logger.debug(
"session with invalid sid '%s' has been asked, " "returning a new one",
"session with invalid sid '%s' has been asked, returning a new one",
sid,
)
return self.new()
+1 -1
View File
@@ -18,4 +18,4 @@ def strtobool(value):
try:
return _MAP[str(value).lower()]
except KeyError as error:
raise ValueError('"{}" is not a valid bool value'.format(value)) from error
raise ValueError(f'"{value}" is not a valid bool value') from error