pants fix [args]
Autofix source code.
Only run these fixers and skip all others.
The fixer names are outputted at the final summary of running this goal, e.g.
pyupgrade. You can also run
fix --only=fake to get a list of all activated fixers.
You can repeat this option, e.g.
fix --only=autoflake --only=pyupgrade or
fix --only=['autoflake', 'pyupgrade'].
If true, skip running all formatters.
FYI: when running
pants fix fmt ::, there should be diminishing performance benefit to using this flag. Pants attempts to reuse the results from
fmt when running
fix where possible.
The target number of files to be included in each fixer batch.
Fixer processes are batched for a few reasons:
1. to avoid OS argument length limits (in processes which don't support argument files) 2. to support more stable cache keys than would be possible if all files were operated on in a single batch. 3. to allow for parallelism in fixer processes which don't have internal parallelism, or -- if they do support internal parallelism -- to improve scheduling behavior when multiple processes are competing for cores and so internal parallelism cannot be used perfectly.
In order to improve cache hit rates (see 2.), batches are created at stable boundaries, and so this value is only a "target" batch size (rather than an exact value).
Updated about 10 hours ago