chore: adopt the standard pre-commit, ruff, and semgrep toolchain (backport of #74) - #84
Merged
aakvatech merged 3 commits intoSep 3, 2026
Conversation
Backport of the CI/tooling setup from PR Aakvatech-Limited#74 on version-15-hotfix. Frappe/erpnext dependency stays pinned to 15.x on this branch.
Use frappe.db.get_single_value for the four reads of Property Management Settings in issue_hook; that doctype is a single. Initialise invoice_item in leaseInvoiceAutoCreate so the flush branch has a binding at the top of the loop. Drop dead locals (foreign_currency in both rent invoice reports, name_in_json in create_property_setter), replace explicit positional format indices, and use 'is None' instead of '== None' in lease.py.
Line length 110, tab indent, double quotes. No behavior change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #74 to
version-15. The automated backport-action job failed on this branch because several of PR #74's commits (the lease renewal, cost-center, and max-active-leases features) are already present here under different hashes — cherry-picking them produced empty diffs the action couldn't recover from. This PR carries over only what was actually missing: the pre-commit/ruff/semgrep toolchain.chore: adopt the standard pre-commit, ruff, and semgrep toolchain— adds.pre-commit-config.yaml,commitlint.config.js,scripts/setup-git-hooks.sh, and the required GitHub workflows.frappe/erpnextstay pinned to>=15.0.0,<16.0.0on this branch (PR ci: adopt the standard pre-commit, ruff, and semgrep toolchain #74's version bump to 16.x does not apply here).fix: clear the semgrep and ruff findings the new gates report— same fixes ci: adopt the standard pre-commit, ruff, and semgrep toolchain #74 made onversion-15-hotfix(undefinedinvoice_item, single-doctype reads viaget_single_value, dead locals,is None), re-applied against this branch's own copies of those files.style: reformat with the app ruff config— pure ruff-format reformatting, no behavior change.Test plan
pre-commit run --all-filespasses (ruff import sort, ruff lint, ruff format, frappe-semgrep-rules, commitlint)ruff check propms --show-settingsconfirms line-length 110 / tab indent are resolved from this app's ownpyproject.tomlfull-repository-check) verified against this same push