chore: resolve linter

This commit is contained in:
ruthra kumar
2025-06-23 17:09:29 +05:30
parent eb4455cb3e
commit 289694ed4c
5 changed files with 10 additions and 8 deletions

View File

@@ -1979,7 +1979,9 @@ class TestPaymentReconciliation(IntegrationTestCase):
def test_reconciliation_on_closed_period_payment(self):
# create backdated fiscal year
first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, [{'MIN': 'year_start_date'}])
first_fy_start_date = frappe.db.get_value(
"Fiscal Year", {"disabled": 0}, [{"MIN": "year_start_date"}]
)
prev_fy_start_date = add_years(first_fy_start_date, -1)
prev_fy_end_date = add_days(first_fy_start_date, -1)
create_fiscal_year(

View File

@@ -2232,7 +2232,6 @@ class AccountsController(TransactionBase):
def set_advance_payment_status(self):
new_status = None
PaymentRequest = frappe.qb.DocType("Payment Request")
paid_amount = frappe.get_value(
doctype="Payment Request",

View File

@@ -663,9 +663,7 @@ def get_rate_for_return(
select_field = "incoming_rate"
else:
StockLedgerEntry = frappe.qb.DocType("Stock Ledger Entry")
select_field = Abs(
StockLedgerEntry.stock_value_difference / StockLedgerEntry.actual_qty
)
select_field = Abs(StockLedgerEntry.stock_value_difference / StockLedgerEntry.actual_qty)
rate = flt(frappe.db.get_value("Stock Ledger Entry", filters, select_field))
if not (rate and return_against) and voucher_type in ["Sales Invoice", "Delivery Note"]:

View File

@@ -4,8 +4,9 @@
import frappe
from frappe import _
from frappe.utils import cint, flt
from frappe.query_builder.functions import Sum
from frappe.utils import cint, flt
from erpnext.controllers.status_updater import StatusUpdater
@@ -174,7 +175,9 @@ class PackingSlip(StatusUpdater):
return (
cint(
frappe.db.get_value(
"Packing Slip", {"delivery_note": self.delivery_note, "docstatus": 1}, [{"MAX": "to_case_no"}]
"Packing Slip",
{"delivery_note": self.delivery_note, "docstatus": 1},
[{"MAX": "to_case_no"}],
)
)
+ 1

View File

@@ -2128,7 +2128,7 @@ class TestPurchaseReceipt(IntegrationTestCase):
self.assertEqual(flt(pr.total * pr.conversion_rate, 2), flt(pr.base_total, 2))
# Test - 2: Sum of Debit or Credit should be equal to Purchase Receipt Base Total
amount = frappe.db.get_value("GL Entry", {"docstatus": 1, "voucher_no": pr.name}, [{'SUM': 'debit'}])
amount = frappe.db.get_value("GL Entry", {"docstatus": 1, "voucher_no": pr.name}, [{"SUM": "debit"}])
expected_amount = pr.base_total
self.assertEqual(amount, expected_amount)