Skip to content
Snippets Groups Projects
Commit 75ef4de48aec authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:shirt: ruff 0.9.2

parent 244ec54c9cbe
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@
"""Create a parser for a postgres connection"""
argument_prefix = f"{prefix}-" if prefix else ""
parser.add_argument(
f"--{database_prefix+'-' if database_prefix else ''}database",
f"--{database_prefix + '-' if database_prefix else ''}database",
help="the database name",
default=default_database,
)
......@@ -53,7 +53,7 @@
for argument in ("user", "password", "host", "port"):
connect_args[argument] = getattr(namespace, f"{argument_prefix}{argument}")
connect_args["database"] = getattr(
namespace, f"{database_prefix+'-' if database_prefix else ''}database"
namespace, f"{database_prefix + '-' if database_prefix else ''}database"
)
return connect_args
......
......@@ -855,8 +855,7 @@
# to include the database name.
# our databases only use file:///data so this should be fine
target = (
"/usr/local/lib/python2.7/dist-packages/"
"openerp-7.0-py2.7.egg/openerp/data"
"/usr/local/lib/python2.7/dist-packages/openerp-7.0-py2.7.egg/openerp/data"
)
filestore_volume_name = "{}_filestore".format(base_data_volume_name)
docker.volume.create(filestore_volume_name, labels={"mount-location": target})
......
......@@ -371,8 +371,7 @@
parser.add_argument(
"--allow-missing-refs",
help=(
"Log warnings on missing XMLIDs instead of stopping with a "
"blocking error."
"Log warnings on missing XMLIDs instead of stopping with a blocking error."
),
action="store_true",
)
......
......@@ -94,9 +94,7 @@
_logger.debug("Found id %d for xmlid %s", res_id, xmlid)
# if the id exists, do an update
query = (
"UPDATE {table} "
"SET {data_placeholders} "
"WHERE id=%s"
"UPDATE {table} SET {data_placeholders} WHERE id=%s"
).format(
table=table,
data_placeholders=",".join(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment