Skip to main content

Flake8 plugin to enforce the same lint configuration (flake8, isort, mypy, pylint) across multiple Python projects

Project description

Nitpick

PyPI Travis CI Documentation Status Coveralls Maintainability Test Coverage Supported Python versions Project License Code style: black Dependabot Status semantic-release

Flake8 plugin to enforce the same tool configuration (flake8, isort, mypy, Pylint...) across multiple Python projects.

Useful if you maintain multiple projects and want to use the same configs in all of them.

Style file

A "nitpick code style" is a TOML file with the settings that should be present in config files from other tools.

Example of a style:

["pyproject.toml".tool.black]
line-length = 120

["pyproject.toml".tool.poetry.dev-dependencies]
pylint = "*"

["setup.cfg".flake8]
ignore = "D107,D202,D203,D401"
max-line-length = 120
inline-quotes = "double"

["setup.cfg".isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
combine_as_imports = true

This style will assert that:

Quick setup

To try the package, simply install it (in a virtualenv or globally, wherever) and run flake8:

$ pip install -U nitpick
$ flake8

Nitpick will download and use the opinionated default style file.

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.21.1
    hooks:
      - id: nitpick

For more details on styles and which configuration files are currently supported, see the full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nitpick-0.21.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nitpick-0.21.1-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file nitpick-0.21.1.tar.gz.

File metadata

  • Download URL: nitpick-0.21.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.5.6

File hashes

Hashes for nitpick-0.21.1.tar.gz
Algorithm Hash digest
SHA256 fb2f5f6e5c1ae8f351b0f9c01bafe68c35d87480e9bac7064cf7d15491d70db9
MD5 6b07b07e0f7ee114667e73c2030e1d84
BLAKE2b-256 047b05de3914038ec43681c42c6b80f0535928fc7a6597d3853a2246ba8a2457

See more details on using hashes here.

File details

Details for the file nitpick-0.21.1-py3-none-any.whl.

File metadata

  • Download URL: nitpick-0.21.1-py3-none-any.whl
  • Upload date:
  • Size: 31.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.5.6

File hashes

Hashes for nitpick-0.21.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff451b41fbfe50ecda0522756a5628d6861c8c4f25c183d65bcd4efede0c8c95
MD5 c27c3116b0b2dc38e14c60908594ea6b
BLAKE2b-256 7c80c360286ef96c19c1b1ce078869c145aa1fb7a92af8a29115ec745410cec8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page