Repository navigation
Description
Pre-commit formats the code (black, isort with the black profile, shfmt, pretty-format-yaml, actionlint, the old-name check), but nothing enforces it: no workflow runs pre-commit, so a contribution made without the local hooks is not checked, and there is no Python linter at all (CI runs Bandit only).
What a linter finds on main (a53f9cd6cc) with ruff's default rules (E4, E7, E9, F): 63 findings, 25 auto-fixable.
| Rule | Count | Note |
|---|---|---|
| F401 unused import | 22 | e.g. core.py:34 json_bulk_dumps |
| E402 import not at top | 15 | |
| F811 redefinition | 9 | tests/test_bulk_insert.py:249 defines TestInsertManyVertexType a second time, byte-identical to the class at line 151 (a duplicated block); the other 8 are pytest fixture parameters named like the fixture |
| F841 unused variable | 8 | |
| F541 f-string without placeholders | 4 | |
| E731, E741 | 2 each | |
| F821 undefined name | 1 | core.py:1562, the string annotation "VectorIndex" (no import under TYPE_CHECKING) |
Proposal, after the 26.11.1 tag (it touches many files and would conflict with the release pull requests):
- add
ruff checkwith its default rules to pre-commit, fix the 63 findings (keep black and isort as the formatters); - add the basic hygiene hooks (trailing whitespace, end of file, merge-conflict markers, large files, private keys);
- add a CI job that runs
uvx pre-commit run --all-fileson every pull request and push, so the hooks are enforced for every contribution; - keep the line length at 88, Black's default, which already applies to code, and state it in
pyproject.toml; no hard limit on comments and strings (ruff'sE501at 88 would flag 2,904 lines that Black deliberately leaves alone); - say how to install the hooks (
uvx pre-commit install) inCONTRIBUTING.md. - cover every file type, not only Python, and match upstream ArcadeDB where the code shares its style:
| Files | Tool | Width |
|---|---|---|
Java (src/java, native/src/main/java), XML (pom.xml) |
prettier 3.9.10 with prettier-plugin-java 2.11.0 and prettier-plugin-xml, the hook and versions of ArcadeData/arcadedb's .pre-commit-config.yaml |
160, upstream's printWidth |
| Python | black + isort (as today), ruff check | 88 |
| Markdown, JSON | prettier with proseWrap: preserve (prose is not hard-wrapped) |
no limit on prose |
| Shell | shfmt (as today) and shellcheck | |
Dockerfile (scripts/Dockerfile.build) |
hadolint | |
| YAML, TOML | pretty-format-yaml (as today), check-yaml, check-toml |
|
| GitHub Actions | actionlint (as today) | |
| AsciiDoc docs | the Antora build in docs.yml already fails on any warning |
The first run of prettier on the Java and XML files may reformat many lines; it lands as its own commit in the same PR, so the review can skip it.
Edited 2026-11-05: the scope widened from Python to every file type in the repository, with upstream ArcadeDB's Java and XML formatter.
Activity