nitpick¶
nitpick
is a tool to lint
your configuration based on existing super rules.
Read the official docs. This tool simplifies the configuration changes across multiple projects.
That’s how it works. It is a two steps process.
Styleguide repository¶
You create a set of files where you describe what configuration must be contained for each tool you use. You also create a master nitpick-style.toml where you list all the styles in a single place
Project repository¶
You install nitpick
and specify the path to your
super nitpick-style.toml
file inside your pyproject.toml
:
[tool.nitpick]
style = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/nitpick-style.toml"
Now when you will run flake8
your configuration will be also linted.
And by “linted” we mean that it will check that all required keys
and values are in place in the correct files.
Partial configs¶
You can also include only some configs if you don’t use some tools for example:
[tool.nitpick]
style = [
"https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/flake8.toml",
"https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/isort.toml",
"https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/darglint.toml"
]
This way you can include only some parts of the global preset.
Support¶
wemake-python-styleguide
officially supports nitpick
and by this we mean that we have our configuration preset
and also run nitpick
on our own configuration on each build.
We only put the essential configuration in the default preset. It is limited to the best-practices and configuration correctness. It is not limited to stylistic choices or complexity settings.
We also offer the full setup of our own internal project with our custom styles/nitpick-style-wemake.toml preset. It includes all preferences and practices specific to our internal projects.
[tool.nitpick]
style = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/nitpick-style-wemake.toml"
Use it if you want the same configuration.