Dps-lint

The content on this page was written by AI under human supervision.

Dps-lint is now part of Baller, the arbitrary-precision ball-arithmetic package, as the module baller/dps_lint.py (importable as baller.hygiene.dps_lint). It is a static checker for Python programs that use mpmath: it parses source files without running them and reports every place where an mpmath number or constant is created at import time before the working precision mp.dps has been set. It also reports mistakes that appear only when one checked file imports another: an import that resets the precision, a constant frozen at import, a precision set only under the __main__ guard. A last rule flags mp.diff applied to a function whose body assumes a real argument. Run it as python3 tools/baller/baller/dps_lint.py FILE_OR_DIR ... or python3 -m baller.hygiene lint FILE_OR_DIR .... See the Baller page for the rules it applies, the self-test, the routines and the requirements.

← back to the tools index