Flake518
A small wrapper around the famous flake8 tool empowering it to read
the configuration not from setup.cfg, tox.ini or .flake8, but from the PEP518
compliant pyproject.toml.
In contrast to flake9 it is not a fork of flake8. It uses flake8 under the hood and transforms the relevant configuration to a flake8 configuration file. This way, the ongoing implementation of flake8 can be used.
Rationale
The usage of pyproject.toml is though highly anticipated by some community members, but currently rejected by the maintainers for an undisclosed reason. Flake9 already uses the pyproject.toml file, but does not incorporate later changes.
Since flake8 allows to pass additional configuration files, a temporary configuration file is created. This way, the latest flake8 revision is used, but it can be configured using pyproject.toml.
Configuration
According to PEP518, each tool may add a tool-specific table to the project configuration.
[tool.flake8]
statistics=True
show-source=True
max-line-length=79
doctests=True
exclude=[".git", "__pypackages__", ".vscode", ".mypy_cache"]
For compliance reason, the [tool.flake518] can be used as well.
Usage with the pre-commit git hooks framework
flake518 can be included as a hook for pre-commit.
The easiest way to get started is to add this configuration to your .pre-commit-config.yaml:
- repo: https://github.com/carstencodes/flake518
rev: '' # pick a git hash / tag to point to
hooks:
- id: flake518
See the pre-commit for how to customize this configuration.
License
Like flake8, this project is licensed under the MIT license.
Contributions
Contributions welcome, feel free to submit issues and pull requests on github. Contact me, if you are using gitlab or codeberg.
Metadata
Release files for flake518 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake518-1.6.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake518-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.0 kB
Release files / flake518-1.6.0.tar.gz
| Download URL | flake518-1.6.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e02efcacb9609e4250265600c7efd559576ae75c93b8898e019fec63128c90b5
|
|
BLAKE2b-256 checksum How to use checksums |
6f82dd9af6f90221b01b4f19fea14d0bc3be4c6fa434f55af363491fb89988d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / flake518-1.6.0-py3-none-any.whl
| Download URL | flake518-1.6.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ebd78e3dcffd0b2f9e8ca03a5d4da1786385d97009a21af11493788f3779977
|
|
BLAKE2b-256 checksum How to use checksums |
d158267e5f0ec6bcf9c6194c54d3e257c9372f87d39d3c079d2a0f61dfd0df14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|