Pants v2: The ergonomic build system

Welcome to the Pants v2 documentation hub!

Pants v2 is a fast, scalable, user-friendly build system for growing codebases. It's currently focused on Python, with support for other languages coming soon.

Here you'll find guides to help you get started with Pants v2, comprehensive documentation on how to configure, run and customize Pants v2, and information on how to get help from the Pants community.

Get Started


Lint source code.

The lint goal runs both dedicated linters and any formatters in check-only mode:

  • Bandit
  • Black
  • Docformatter
  • Flake8
  • isort
  • Pylint

See here for how to opt in to specific formatters and linters, along with how to configure them.


Benefit of Pants: runs linters in parallel

Pants will run all activated linters at the same time for improved performance. You can see this through Pants's dynamic UI.


Benefit of Pants: lint Python 2-only and Python 3-only code at the same time

Bandit, Flake8, and Pylint depend on which Python interpreter the tool is run with. Normally, if your project has some Python 2-only files and some Python 3-only files, you would not be able to run the linter in a single command because it would fail to parse your code.

Instead, Pants will do the right thing when you run ./pants lint ::. Pants will group your targets based on their interpreter constraints, and run all the Python 2 targets together and all the Python 3 targets together.

Updated 7 months ago


Lint source code.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.