Flake8-pyproject


NameFlake8-pyproject JSON
Version 1.2.3 PyPI version JSON
download
home_pageNone
SummaryFlake8 plug-in loading the configuration from pyproject.toml
upload_time2023-03-21 20:51:38
maintainerNone
docs_urlNone
authorJohn Hennig
requires_python>= 3.6
licenseNone
keywords flake8 pyproject.toml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

[Flake8]: https://github.com/PyCQA/flake8
[#234]:   https://github.com/PyCQA/flake8/issues/234
[#1332]:  https://github.com/PyCQA/flake8/pull/1332
[#1421]:  https://github.com/PyCQA/flake8/issues/1421
[#1431]:  https://github.com/PyCQA/flake8/issues/1431
[#1447]:  https://github.com/PyCQA/flake8/issues/1447
[#1501]:  https://github.com/PyCQA/flake8/issues/1501


## Usage

Say your Flake8 configuration in `.flake8` (or in `tox.ini`, or
`setup.cfg`) is this:
```ini
[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]:
```toml
[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.

[TOML format]: https://toml.io

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Flake8-pyproject",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">= 3.6",
    "maintainer_email": null,
    "keywords": "Flake8,pyproject.toml",
    "author": "John Hennig",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "\ufeff# Flake8-pyproject\n*Flake8 plug-in loading the configuration from `pyproject.toml`*\n\n[Flake8] cannot be configured via `pyproject.toml`, even though\nvirtually all other Python dev tools have adopted it as the central\nlocation for project configuration. The discussion of the original\nproposal ([#234]) was closed as \"too heated\", subsequent feature\nand pull requests were marked as \"spam\" ([#1332], [#1421], [#1431],\n[#1447], [#1501]).\n\nFlake8-pyproject also has bad manners and force-feeds Flake8 the\nspam it so despises. It registers itself as a Flake8 plug-in to\nseamlessly load the configuration from `pyproject.toml` when you\nrun the `flake8` command.\n\n[Flake8]: https://github.com/PyCQA/flake8\n[#234]:   https://github.com/PyCQA/flake8/issues/234\n[#1332]:  https://github.com/PyCQA/flake8/pull/1332\n[#1421]:  https://github.com/PyCQA/flake8/issues/1421\n[#1431]:  https://github.com/PyCQA/flake8/issues/1431\n[#1447]:  https://github.com/PyCQA/flake8/issues/1447\n[#1501]:  https://github.com/PyCQA/flake8/issues/1501\n\n\n## Usage\n\nSay your Flake8 configuration in `.flake8` (or in `tox.ini`, or\n`setup.cfg`) is this:\n```ini\n[flake8]\nignore = E231, E241\nper-file-ignores =\n    __init__.py:F401\nmax-line-length = 88\ncount = true\n```\n\nCopy that `[flake8]` section to `pyproject.toml`, rename it as\n`[tool.flake8]`, and convert the key\u2013value pairs to the [TOML format]:\n```toml\n[tool.flake8]\nignore = ['E231', 'E241']\nper-file-ignores = [\n    '__init__.py:F401',\n]\nmax-line-length = 88\ncount = true\n```\n\nThen run `flake8` in the project root folder, where `pyproject.toml`\nis located.\n\nIn case your TOML-based configuration is contained in a different\nfolder, or the file has a different name, specify the location with\nthe `--toml-config` command-line option.\n\nFor compatibility with earlier versions of this package, and perhaps\nextra reliability in terms of possible future breakage of the plug-in\nhook, the package also provides a `flake8p` command that could be\ncalled alternatively to lint the code.\n\n[TOML format]: https://toml.io\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Flake8 plug-in loading the configuration from pyproject.toml",
    "version": "1.2.3",
    "split_keywords": [
        "flake8",
        "pyproject.toml"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5f1d635e86f9f3a96b7ea9e9f19b5efe17a987e765c39ca496e4a893bb999112",
                "md5": "52f36943513a9f97829e29040df15c07",
                "sha256": "6249fe53545205af5e76837644dc80b4c10037e73a0e5db87ff562d75fb5bd4a"
            },
            "downloads": -1,
            "filename": "flake8_pyproject-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "52f36943513a9f97829e29040df15c07",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">= 3.6",
            "size": 4756,
            "upload_time": "2023-03-21T20:51:38",
            "upload_time_iso_8601": "2023-03-21T20:51:38.911198Z",
            "url": "https://files.pythonhosted.org/packages/5f/1d/635e86f9f3a96b7ea9e9f19b5efe17a987e765c39ca496e4a893bb999112/flake8_pyproject-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-21 20:51:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "flake8-pyproject"
}
        
Elapsed time: 0.27566s