Skip to content

Commit f9b4553

Browse files
committed
Disable ruff modern 'with' syntax
Because we need python 3.6. We do this by setting ruff target-version to the lowest supported.
1 parent 841e932 commit f9b4553

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

click_odoo_contrib/backupdb.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,9 @@ def main(env, dbname, dest, force, if_exists, format, filestore):
115115
filestore = False
116116
db = odoo.sql_db.db_connect(dbname)
117117
try:
118-
with (
119-
backup(format, dest, "w") as _backup,
120-
db.cursor() as cr,
121-
db_management_enabled(),
122-
):
118+
with backup(
119+
format, dest, "w"
120+
) as _backup, db.cursor() as cr, db_management_enabled():
123121
if format != "dump":
124122
_create_manifest(cr, dbname, _backup)
125123
if filestore:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ build-backend = "setuptools.build_meta"
99
issue_format = "`#{issue} <https://github.com/acsone/click-odoo-contrib/issues/{issue}>`_"
1010
directory = "newsfragments/"
1111
filename = "CHANGES.rst"
12+
13+
[tool.ruff]
14+
target-version = "py37"

0 commit comments

Comments
 (0)