Flake8 plug-in loading the configuration from pyproject.toml
Project description
Flake8-pyproject
Flake8 plug-in loading the configuration from pyproject.toml
Flake8 cannot be configured via pyproject.toml, even though
virtually all other Python dev tools have adopted it as the central
location for project configuration. The discussion of the original
proposal (#234) was closed as "too heated", subsequent feature
and pull requests were marked as "spam" (#1332, #1421, #1431,
#1447, #1501).
Flake8-pyproject also has bad manners and force-feeds Flake8 the
spam it so despises. It registers itself as a Flake8 plug-in to
seamlessly load the configuration from pyproject.toml when you
run the flake8 command.
Usage
Say your Flake8 configuration in .flake8 (or in tox.ini, or
setup.cfg) is this:
[flake8]
ignore = E231, E241
per-file-ignores =
__init__.py:F401
max-line-length = 88
count = true
Copy that [flake8] section to pyproject.toml, rename it as
[tool.flake8], and convert the key–value pairs to the TOML format:
[tool.flake8]
ignore = ['E231', 'E241']
per-file-ignores = [
'__init__.py:F401',
]
max-line-length = 88
count = true
Then run flake8 in the project root folder, where pyproject.toml
is located.
In case your TOML-based configuration is contained in a different
folder, or the file has a different name, specify the location with
the --toml-config command-line option.
For compatibility with earlier versions of this package, and perhaps
extra reliability in terms of possible future breakage of the plug-in
hook, the package also provides a flake8p command that could be
called alternatively to lint the code.
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8_pyproject-1.2.4-py3-none-any.whl.
File metadata
- Download URL: flake8_pyproject-1.2.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea34c057f9a9329c76d98723bb2bb498cc6ba8ff9872c4d19932d48c91249a77
|
|
| MD5 |
83e9270ba3e79e0741ca06fa18682ef2
|
|
| BLAKE2b-256 |
856acdee9ff7f2b7c6ddc219fd95b7c70c0a3d9f0367a506e9793eedfc72e337
|
Provenance
The following attestation bundles were made for flake8_pyproject-1.2.4-py3-none-any.whl:
Publisher:
publish.yml on john-hen/Flake8-pyproject
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flake8_pyproject-1.2.4-py3-none-any.whl -
Subject digest:
ea34c057f9a9329c76d98723bb2bb498cc6ba8ff9872c4d19932d48c91249a77 - Sigstore transparency entry: 731176185
- Sigstore integration time:
-
Permalink:
john-hen/Flake8-pyproject@3c516a9319beee324f9a200dfb4e08677de4a63f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/john-hen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3c516a9319beee324f9a200dfb4e08677de4a63f -
Trigger Event:
workflow_dispatch
-
Statement type: