Install / Basic usage¶
To try the package, simply install it (in a virtualenv or globally) and run flake8 on a project with at least one Python (
# Install with pip: pip install -U nitpick # Add to your project with Poetry: poetry add --dev nitpick # On macOS, install with Homebrew: brew install andreoliwa/formulae/nitpick # On archlinux, install with yay: yay -Syu nitpick # Run nitpick directly to modify your files nitpick run # Or run with flake8 to only check for errors flake8 .
You can use it as a template to Configure your own style.
Run as a pre-commit hook (recommended)¶
If you use pre-commit on your project (you should), add this to the
.pre-commit-config.yaml in your repository:
repos: - repo: https://github.com/andreoliwa/nitpick rev: v0.26.0 hooks: - id: nitpick
To install the
commit-msg Git hooks:
pre-commit install --install-hooks pre-commit install -t commit-msg
To start checking all your code against the default rules:
pre-commit run --all-files