run pre-commit

This commit is contained in:
Alexandre Fayolle
2024-06-24 11:58:48 +02:00
parent 451facfeb6
commit 61d30ef6ff
22 changed files with 60 additions and 54 deletions
+3 -3
View File
@@ -70,7 +70,7 @@ class CloudPlatform(models.AbstractModel):
self.check()
if configs.filestore.location == "remote":
self.env["ir.attachment"].sudo().force_storage()
_logger.info("cloud platform configured for {}".format(platform_kind))
_logger.info(f"cloud platform configured for {platform_kind}")
@api.model
def install(self):
@@ -105,7 +105,7 @@ class CloudPlatform(models.AbstractModel):
prefix = os.environ["ODOO_SESSION_REDIS_PREFIX"]
assert re.match(r"^[a-z-0-9]+-odoo-[a-z-0-9]+$", prefix), (
"ODOO_SESSION_REDIS_PREFIX must match '<client>-odoo-<env>'"
", we got: '%s'" % (prefix,)
f", we got: '{prefix}'"
)
@api.model
@@ -126,5 +126,5 @@ class CloudPlatform(models.AbstractModel):
self._check_redis(environment_name)
def _register_hook(self):
super(CloudPlatform, self)._register_hook()
super()._register_hook()
self.sudo().check()
+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
+3
View File
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"