chore: adopt the standard pre-commit, ruff, and semgrep toolchain (backport of #74) - #85
Merged
aakvatech merged 4 commits intoSep 3, 2026
Conversation
Backport of the CI/tooling setup from PR Aakvatech-Limited#74 on version-15-hotfix. Replaces the old unanchored-exclude .pre-commit-config.yaml (v0.8.1 ruff, no commit-msg/pre-push stages, no semgrep) and outdated linter.yml with the standard three-stage config. Bumps the frappe/erpnext dependency range to 16.x, matching this branch. Deletes ci.yml (bench build in CI, disallowed), release.yml and .releaserc.json (semantic-release duplicates tag-and-promote).
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.
ci-tests.yml built a full bench, installed erpnext and propms, and ran the Frappe test runner on every PR/push -- 5-8 minutes per run, needs MariaDB and two Redis services, and goes red for upstream or PyPI breakage unrelated to the diff. Frappe tests run locally only, on the bench terminal. No branch protection rule on this branch names a job from this workflow, so nothing else needs updating.
aakvatech
merged commit Sep 3, 2026
aff997f
into
Aakvatech-Limited:version-16-hotfix
4 checks passed
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-16-hotfix. The automated backport-action job failed on this branch for the same reason it failed onversion-15: PR #74's lease renewal / cost-center / max-active-leases commits are already ancestors of this branch, so cherry-picking them produced empty diffs the action couldn't recover from. This PR brings over what was actually missing or outdated: the pre-commit/ruff/semgrep toolchain.This branch already had a partial, older toolchain, which this PR replaces:
.pre-commit-config.yamlused an unanchoredexclude: 'node_modules|.git'(breaks validation of.github/*), ruff v0.8.1 with nopre-commit/commit-msg/pre-pushstage split, and no semgrep or commitlint hooks. Replaced with the standard three-stage config.linter.ymlwas the old single-job version. Replaced with the standard blocking/non-blocking semgrep split + pip-audit.pyproject.tomlruff config corrected (line-length 110, tab indent,E101/W191ignored);frappe/erpnextbumped to>=16.0.0,<17.0.0to match this branch.commitlint.config.js,scripts/setup-git-hooks.sh,.github/workflows/pre-commit.yml,.github/workflows/semantic-commits.yml.ci.yml,ci-tests.yml(both spun up a full bench and ran the Frappe test suite in CI on every PR/push -- 5-8 min per run, needs MariaDB/Redis, goes red for reasons unrelated to the diff),release.yml,.releaserc.json(semantic-release, duplicatestag-and-promote-from-pr-label.yml).backport.ymlandtag-and-promote-from-pr-label.ymlwere already current; left untouched.fix: clear the semgrep and ruff findings...-- same fixes ci: adopt the standard pre-commit, ruff, and semgrep toolchain #74 made onversion-15-hotfix, re-applied here.style: reformat with the app ruff config-- pure formatting, no behavior change.No branch protection rule on
version-16-hotfixnames a job from the deleted workflows, so nothing else needs updating.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.toml.github/workflows/full-repository-check) verified against this same push