Skip to content

chore: adopt the standard pre-commit, ruff, and semgrep toolchain (backport of #74) - #84

Merged
aakvatech merged 3 commits into
Aakvatech-Limited:version-15from
av-dev2:backport-74-to-version-15
Sep 3, 2026
Merged

chore: adopt the standard pre-commit, ruff, and semgrep toolchain (backport of #74)#84
aakvatech merged 3 commits into
Aakvatech-Limited:version-15from
av-dev2:backport-74-to-version-15

Conversation

@av-dev2

@av-dev2 av-dev2 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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/erpnext stay pinned to >=15.0.0,<16.0.0 on 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 on version-15-hotfix (undefined invoice_item, single-doctype reads via get_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-files passes (ruff import sort, ruff lint, ruff format, frappe-semgrep-rules, commitlint)
  • ruff check propms --show-settings confirms line-length 110 / tab indent are resolved from this app's own pyproject.toml
  • push gate (full-repository-check) verified against this same push

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.
@aakvatech
aakvatech merged commit 94a2c3d into Aakvatech-Limited:version-15 Sep 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants