mollify 0.1.3
What's new in 0.1.3
Precision release: a real-world audit surfaced a cluster of false positives whose
root causes are fixed here (on a fixture reproducing the audited patterns, the
score moved from 20/100 to 95/100). Two new ADRs document the core graph-semantic
changes (ADR-0002,
ADR-0003).
Fixed
Precision pass from a real-world audit (running mollify on an external Python
package) that surfaced these false positives:
- Relative imports in a package
__init__.pynow resolve. A package's
__init__.pyhas the package itself as its dotted name, so the resolver was
dropping one segment too many —.aaresolved toaainstead ofpkg.aa.
This cascaded into spuriousunresolved-import→unused-file→
unused-exportacross re-exporting packages (the dominant FP source). Package
self-references no longer create acircular-dependency. session.exec(...)no longer flaggeddangerous-eval(CWE-95). The
security rule matched any trailing.exec/.evalsegment; it now matches only
theeval/exec/compilebuiltins, not ORM/driver methods.- pytest
test_*/Test*are no longerunused-export. They are treated as
reachability roots within test paths, honoring
[tool.pytest.ini_options].testpaths. from __future__ import …is no longerunused-import(it has a compiler
effect and is never unused).- Lazy/in-function imports now count toward dependency usage and
reachability, so a dependency imported only insidemain()(e.g.uvicorn)
isn't falselyunused-dependency; module-scopeunused-importis unaffected. [project.scripts]entry points are reachability roots — the target
module isn'tunused-fileand the named function isn'tunused-export.- First-party test helpers imported by bare leaf name (
conftest, sibling
modules on a test path) are no longermissing-dependency. commented-codeno longer fires on prose that opens with a keyword
(e.g.# from zero (...), doubled.);from …now requires a realimport.
Changed
- Quality score is weighted by confidence —
uncertainfindings penalize
the 0–100 score far less thancertainones, so a report dominated by
low-confidence review items no longer reads as a failing grade. Still
deterministic. mollify initwrites a richer, documented starter.mollifyrc.json
(five-area severities,type-healthoff by default, complexity knobs,
inline_commentdocs).
Added
--include <DIR>flag on all 8 analysis commands (audit,dead-code,
deps,arch,complexity,dupes,types,security; not
coverage/supply-chain, which aren't path-scoped). Repeatable; overrides
the builtin discovery denylist (.venv,.git,__pycache__,
node_modules,build,dist, etc.),.mollifyrc.json'sexclude_dirs,
and.gitignorefor the named directory, letting users opt a directory
back into scanning on a per-invocation basis. Does not override the
pyvenv.cfgvirtualenv guard — an included directory that is itself a
virtualenv stays excluded.
Install / upgrade
uvx mollify@0.1.3 audit # or: uv tool install mollify
pip install --upgrade mollify
cargo install mollify-cli # binary: mollifyFull changelog: https://github.com/FavioVazquez/mollify/blob/v0.1.3/CHANGELOG.md