Utility tying multiple code quality tools together
Project description
Multilint (for Python)
A utility tying together multiple linting and other code quality tools
Multilint allows running several code quality tools under the same interface. This is convenient as it saves time on writing multiple linter / formatter / checker invocations every time in a project.
Additionally, for tools that do
not currently support configuration via pyproject.toml
(PEP-621), Multilint exposes a
configuration interface for them. This allows for centralized codification of
configuration of all code quality tools being used in a project.
Example relevant sections from a pyproject.toml
:
[tool.autoflake]
recursive = true
in_place = true
ignore_init_module_imports = true
remove_all_unused_imports = true
remove_unused_variables = true
verbose = true
srcs = ["."]
[tool.mypy]
src = "."
[tool.multilint]
tool_order = ["autoflake", "isort", "black", "mypy"]
Currently, the only supported configuration option for Multilint is
tool_order
which defines the execution order of supported tools.
At the time of writing of this README (2020-01-31), neither
Autoflake nor
Mypy
support configuration via pyproject.toml
. While support for each may or may
not be added at some point in the future, with multilint configuring these tools
is possible today.
Supported Tools
- Autoflake - removes unused imports and unused variables as identified by Pyflakes
- Isort - sorts imports according to specified orders
- Black - the self-proclaimed "uncompromising code formatter" - formats Python source with an opinionated style
- Mypy - static type checker for Python
- Pylint - general best practices linter
- Pydocstyle - in-source documentation best practices linter
Support for more tools may be added by subclassing the
ToolRunner
class and overriding the
.run(...)
method.
There are some utilities provided, such as:
- A logger that masquerades as a TextIO object to allow capturing tool output from within and a configuration
- A mapping for tool configuration that is automatically available in the
ToolRunner
class (as long as it is registered in theTool
) enum, theTOOL_RUNNERS
mapping, and declared in theDEFAULT_TOOL_ORDER
class variable ofMultilint
.
Documentation about adding support for more tools to Multilint may be added in the future.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pymultilint-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a70a75d09889d59191e9f170f8a3d7d2fece7c64097cef031c94523c3cdc50bc |
|
MD5 | 2c894db41e738fac892ae832d64147c3 |
|
BLAKE2b-256 | 0fd13bee2f4a6d075a13040ae060dd8961b5b77a6581945e3905c7ea72b11b82 |