From 8f96e5f2aada5f56427d7fd6e5e3809e9dcd836c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 3 Jul 2026 17:03:51 +0530 Subject: [PATCH] test: replace lambda with nested def (ruff E731) --- .../serial_and_batch_bundle/test_serial_and_batch_bundle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py index 213cb783271..4ad8a4f4136 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py @@ -1516,7 +1516,9 @@ class TestSerialandBatchBundleLogic(ERPNextTestSuite): self.assertEqual(agg["B2"], 5) def test_get_type_of_transaction_derives_direction(self): - se = lambda **kw: get_type_of_transaction(frappe._dict(doctype="Stock Entry"), frappe._dict(**kw)) + def se(**kw): + return get_type_of_transaction(frappe._dict(doctype="Stock Entry"), frappe._dict(**kw)) + self.assertEqual(se(s_warehouse="W"), "Outward") # issuing from a source warehouse self.assertEqual(se(), "Inward") # only a target warehouse self.assertEqual(