Skip to content

Commit 35f64c4

Browse files
committed
[chore] fix lint violations in base/tests
Part-of: odoo/upgrade#5120
1 parent b520cbf commit 35f64c4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/base/tests/test_moved0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ def invariant(self):
1212
if util.version_gte("16.0"):
1313
# See https://github.com/odoo/odoo/commit/50767ef90eadeca2ed05b9400238af8bdbe77fb3
1414
self.skipTest("Starting Odoo 16, no more `moved0` columns are created")
15-
return
15+
return None
1616

1717
return impl.get_moved0_columns(self.env.cr)

src/base/tests/test_util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def test_change_leaf(self):
5656
self.cr, "res.partner", "user_id", "user_id", "res.users", domain, adapter=self.mock_adapter
5757
) # even if new==old the adapter must be called
5858
self.mock_adapter.assert_called_once()
59+
# Ignore `boolean-positional-value-in-call` lint violations in the whole file
60+
# ruff: noqa: FBT003
5961
self.mock_adapter.assert_called_with(domain[0], False, False)
6062
self.assertEqual(None, new_domain)
6163

@@ -445,16 +447,17 @@ def setUpClass(cls):
445447
)
446448
def test_inherit_parents(self, model, expected):
447449
cr = self.env.cr
448-
result = sorted(list(util.inherit_parents(cr, model)))
450+
result = sorted(util.inherit_parents(cr, model))
449451
self.assertEqual(result, sorted(expected))
450452

451453

452454
class TestNamedCursors(UnitTestCase):
453455
@staticmethod
454-
def exec(cr, which="", args=()):
456+
def exec(cr, which="", args=()): # noqa: A003
455457
cr.execute("SELECT * FROM ir_ui_view")
456458
if which:
457459
return getattr(cr, which)(*args)
460+
return None
458461

459462
@parametrize(
460463
[

0 commit comments

Comments
 (0)