Skip to content

refactor: use `json` directly instead of using `frappe.json` by akhilnarang [frappe] PR#41609

Bot Dokos requested to merge ft-pr-41609 into develop

From: https://github.com/frappe/erpnext/pull/41609
Date: 2024-05-23 19:30:42+05:30

  • refactor: use json directly instead of using frappe.json (#41609)



Diagnostics

pre-commit failed for source commit: 3f06f1905f6c86eaa5eb4d33765a46470892f576
Run ruff linter and apply fixes..........................................Failed
- hook id: ruff
- exit code: 1

erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py:930:7: B007 Loop control variable `i` not used within loop body
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py:1339:7: B007 Loop control variable `i` not used within loop body
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py:1363:7: B007 Loop control variable `i` not used within loop body
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py:1777:8: B007 Loop control variable `i` not used within loop body
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py:2936:3: F841 Local variable `tds_payable_account` is assigned to but never used
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py:3453:3: F841 Local variable `ledger_outstanding` is assigned to but never used
erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py:77:33: RUF013 PEP 484 prohibits implicit `Optional`
erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py:77:54: RUF013 PEP 484 prohibits implicit `Optional`
erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py:92:11: RUF013 PEP 484 prohibits implicit `Optional`
erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py:92:32: RUF013 PEP 484 prohibits implicit `Optional`
erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py:92:53: RUF013 PEP 484 prohibits implicit `Optional`
erpnext/stock/doctype/warehouse/warehouse.py:201:9: RUF005 Consider `[*children, warehouse]` instead of concatenation
Found 12 errors.
No fixes available (11 hidden fixes can be enabled with the `--unsafe-fixes` option).

Format Python code.......................................................Failed
- hook id: ruff-format
- files were modified by this hook

4 files reformatted, 4 files left unchanged



Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-41609

# Alternatively, re-take the changes
git switch develop
ft take ft-pr-41609

# Make changes then rebase
git rebase -i develop

# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue

# Force-push changes
git push --force-with-lease

Merge request reports