lintmax-py
Maximum-strictness Python quality gate. One command, always-latest, never stale.
The Python counterpart to lintmax (TypeScript), lintmax-go and lintmax-rs. Designed for coding agents, not humans.
Why
Python ships no strictness by default: no compiler, no unused-import error, no type enforcement. lintmax-py closes that gap and pushes past it — every rule ruff carries including the preview set, every ty diagnostic at error severity, plus the layers neither tool covers: dead code, unused dependencies, vulnerabilities, spelling, shell scripts and every non-Python file in the tree.
Never stale
No tool version is ever pinned. Ruff, ty and every child tool are fetched at latest on each run, and the rule set is DERIVED from the installed ruff rather than listed — so the moment ruff ships a new rule, your gate runs it. Dependency staleness is scanned against upstream every run.
dprint plugins resolve through each plugin's latest.json and the concrete versioned URL is written back. A constant floating URL is deliberately NOT used: dprint caches a plugin by its URL, so an unchanging URL resolves once and then freezes silently, which is the exact staleness the floating form appears to solve.
Use
Exactly four commands — the lean agent-first surface:
lintmax-py fix # format + autofix + full gate — the default action
lintmax-py check # verify only, no writes (CI mode) — same exhaustive scanner set
lintmax-py version # print version
lintmax-py rules # list every enabled rule under the maxed config
Prints ok on a single line on success, exit 0 = clean. Tool output is shown only on failure. A clean run that is cached prints ok (cached).
Self-evolving (automatic, never a command)
- Child tools reinstalled at latest on a refresh cadence; CI always forces latest.
- The binary refreshes itself in CI before gating.
- No green-tree-hash cache: measured on 10,039 real files with all 968 rules, a full ruff run costs 4.3s while hashing the tree to skip it costs 2.6s, so the cache buys ~40% in its best case and adds a false-green failure mode. The expensive work is the network, and that is TTL-cached instead.
- Dependency staleness scanned against upstream every run.
What runs
| Layer | Tool | Catches |
|---|---|---|
| comments | native (tokenize) |
deletes every # comment except directives; docstrings survive |
| format | ruff format | deterministic formatting |
| lint | ruff, every rule including preview | 968 rules across 59 linters at ruff 0.16.1 |
| types | ty, every rule at error | type errors, including unannotated bodies mypy skips |
| dead code | vulture | unreachable functions, classes and names |
| unused deps | deptry | declared-but-unused and used-but-undeclared |
| vulnerabilities | pip-audit | PyPI Advisory Database plus OSV |
| spelling | typos | misspellings in code, identifiers and filenames |
| shell | shellcheck, shfmt | every shell script, every optional check on |
| other files | dprint | toml, json, markdown, yaml, dockerfile, css, html |
Strictness policy
- The ruff rule set is derived from
ruff rule --all, so a newly shipped rule is enabled the run after it lands.ALLalone is not enough: preview rules require their exact code. - Every rule is error or off, never warn.
- ty runs with all rules at error severity.
- Ruff's own conflicting-rule pairs resolve to the stricter member.
- The disable list starts EMPTY. Each entry is earned by a concrete conflict found on real code, never anticipated, and carries its reason.
Earned disables
| Rule | Reason |
|---|---|
D100-D107 |
operator decision: code is self-explanatory rather than docstring-documented |
CPY001 |
stands down unless the project declares its notice-rgx; enforced on every file once it does |
Configless
Every rule config is embedded in the tool. Your project stays clean — no ruff.toml, no ty.toml, no dprint.json. Updating lintmax-py updates every project's strictness. The bundled config is generic only and carries no project or ecosystem opinion.
The single exception is vocabulary, which is data rather than strictness. A spell checker with no project dictionary reports every domain noun a codebase owns — a client name, a product name, a protocol token — as a misspelling, and the only escapes would be renaming the domain or turning the stage off. So the [default.extend-words] and [default.extend-identifiers] tables are read from whichever of typos.toml, _typos.toml, .typos.toml or pyproject.toml ([tool.typos]) your project carries, in that order, and merged into the generated config. Nothing else in that file is read: the switches stay owned by the gate, so a project can name the words it uses and cannot weaken the check that reads them.
# typos.toml
[default.extend-words]
myproduct = "myproduct"
The same principle covers the ambiguous-character rule: a codebase whose domain language is not Latin uses punctuation the rule reads as a homoglyph, and rewriting it would change the text the product ships. Declare those characters in ruff.toml, .ruff.toml or pyproject.toml ([tool.ruff.lint]) and they are merged into the generated config; every character you do not name stays flagged.
# ruff.toml
[lint]
allowed-confusables = ["(", ")", ":"]
Two more facts a gate cannot infer are read the same way. A dead-code scan cannot see a function reached only through a registration decorator, nor an attribute read only by a metaclass, so a project states them and every other name stays scanned:
# pyproject.toml
[tool.vulture]
ignore_decorators = ["@app.route"]
ignore_names = ["model_config"]
And the copyright rule enforces nothing until a project says whose notice it wants — the holder is a legal fact about that codebase. Declare notice-rgx and the rule is enforced on every file; declare nothing and it stands down, with no other rule relaxed.
# ruff.toml
[lint.flake8-copyright]
notice-rgx = "(?i)Copyright\\s+\\(c\\) Example Ltd"
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lintmax_py-0.0.8.tar.gz.
File metadata
- Download URL: lintmax_py-0.0.8.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3681abeb008204dad6071ae272f7a84da4c6b42fd4eef9b2fd58d67834dc095e
|
|
| MD5 |
b5064c1c0d6471cf7468698a5b882c7b
|
|
| BLAKE2b-256 |
2eaef88d57dd1342404f19803a0d06472386f38771472fc23ff03e1f63c5ae0d
|
File details
Details for the file lintmax_py-0.0.8-py3-none-any.whl.
File metadata
- Download URL: lintmax_py-0.0.8-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fed102d362d1541155ee36d35317986d51f0b24149cfb603673be52f9733c474
|
|
| MD5 |
7ca8ef217269dcc5316ffcb260deb210
|
|
| BLAKE2b-256 |
6347bea4a8b5ae3fde11b72dc32ec2770858e02ae0e2ba96f6d2027ea76a4028
|