flakeheaven


Nameflakeheaven JSON
Version 3.3.0 PyPI version JSON
download
home_pagehttps://github.com/flakeheaven/flakeheaven
SummaryFlakeHeaven is a [Flake8](https://gitlab.com/pycqa/flake8) wrapper to make it cool.
upload_time2023-04-10 21:36:03
maintainer
docs_urlNone
authorGram
requires_python>=3.7,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FlakeHeaven

[![License: MIT](https://img.shields.io/pypi/l/flakeheaven)](https://opensource.org/licenses/MIT)
[![python versions](https://img.shields.io/pypi/pyversions/flakeheaven)](https://pypi.org/project/flakeheaven/)

[![version](https://img.shields.io/pypi/v/flakeheaven)](https://pypi.org/project/flakeheaven/)
[![conda](https://anaconda.org/conda-forge/flakeheaven/badges/version.svg)](https://anaconda.org/conda-forge/flakeheaven)
[![Downloads](https://img.shields.io/pypi/dm/flakeheaven)](https://pypi.org/project/flakeheaven/)

[![CI](https://github.com/flakeheaven/flakeheaven/actions/workflows/ci.yaml/badge.svg)](https://github.com/flakeheaven/flakeheaven/actions/workflows/ci.yaml)
[![Docs](https://readthedocs.org/projects/flakeheaven/badge/?version=latest)](https://flakeheaven.readthedocs.io/en/latest/)


flakeheaven is a python linter built around flake8 to enable inheritable and complex toml configuration.

This project is a fork of [FlakeHell](https://github.com/life4/flakehell). FlakeHell and other forks of it such as
flakehell/flakehell are [no longer maintained](https://github.com/flakehell/flakehell/issues/25) and do not work with Flake8 4.0.x.

FlakeHeaven works with Flake8 4.0.1 or greater. This fork will be [maintained by the community](https://github.com/flakeheaven/flakeheaven/discussions/1) that developed the existing forks.

+ [Lint md, rst, ipynb, and more](https://flakeheaven.readthedocs.io/en/latest/parsers.html).
+ [Shareable and remote configs](https://flakeheaven.readthedocs.io/en/latest/config.html#base).
+ [Legacy-friendly](https://flakeheaven.readthedocs.io/en/latest/commands/baseline.html): ability to get report only about new errors.
+ Caching for much better performance.
+ [Use only specified plugins](https://flakeheaven.readthedocs.io/en/latest/config.html#plugins), not everything installed.
+ [Make output beautiful](https://flakeheaven.readthedocs.io/en/latest//formatters.html).
+ [pyproject.toml](https://www.python.org/dev/peps/pep-0518/) support.
+ [Check that all required plugins are installed](https://flakeheaven.readthedocs.io/en/latest/commands/missed.html).
+ [Syntax highlighting in messages and code snippets](https://flakeheaven.readthedocs.io/en/latest/formatters.html#colored-with-source-code).
+ [PyLint](https://github.com/PyCQA/pylint) integration.
+ [Powerful GitLab support](https://flakeheaven.readthedocs.io/en/latest/formatters.html#gitlab).
+ Codes management:
    + Manage codes per plugin.
    + Enable and disable plugins and codes by wildcard.
    + [Show codes for installed plugins](https://flakeheaven.readthedocs.io/en/latest/commands/plugins.html).
    + [Show all messages and codes for a plugin](https://flakeheaven.readthedocs.io/en/latest/commands/codes.html).
    + Allow codes intersection for different plugins.

![output example](./assets/grouped.png)

## Compatibility

FlakeHeaven supports all flake8 plugins, formatters, and configs. However, FlakeHeaven has its own beautiful way to configure enabled plugins and codes. So, options like `--ignore` and `--select` are unsupported. You can have flake8 and FlakeHeaven in one project if you want but enabled plugins should be explicitly specified.

## Installation

```bash
python3 -m pip install --user flakeheaven
```

## Usage

First of all, let's create `pyproject.toml` config:

```toml
[tool.flakeheaven]
# optionally inherit from remote config (or local if you want)
base = "https://raw.githubusercontent.com/flakeheaven/flakeheaven/main/pyproject.toml"
# specify any flake8 options. For example, exclude "example.py":
exclude = ["example.py"]
# make output nice
format = "grouped"
# 80 chars aren't enough in 21 century
max_line_length = 90
# show line of source code in output
show_source = true

# list of plugins and rules for them
[tool.flakeheaven.plugins]
# include everything in pyflakes except F401
pyflakes = ["+*", "-F401"]
# enable only codes from S100 to S199
flake8-bandit = ["-*", "+S1??"]
# enable everything that starts from `flake8-`
"flake8-*" = ["+*"]
# explicitly disable plugin
flake8-docstrings = ["-*"]
```

Show plugins that aren't installed yet:

```bash
flakeheaven missed
```

Show installed plugins, used plugins, specified rules, codes prefixes:

```bash
flakeheaven plugins
```

![plugins command output](./assets/plugins.png)

Show codes and messages for a specific plugin:

```bash
flakeheaven codes pyflakes
```

![codes command output](./assets/codes.png)

Run flake8 against the code:

```bash
flakeheaven lint
```

This command accepts all the same arguments as Flake8.

Read [the documentation](https://flakeheaven.readthedocs.io/en/latest/) for more information.

## Contributing

1. Add tests when possible (eg for features / fixes / refactor, etc. )
2. Add your contribution to the code / docs
3. Ensure your code passes all (both original and your own) tests.
4. Commit using [proper header](https://www.conventionalcommits.org/en/v1.0.0/)
5. Create a PR

Contributions are welcome! A few ideas where you can contribute:

+ Improve documentation.
+ Add more tests.
+ Improve performance.
+ Found a bug? Fix it!
+ Made an article about FlakeHeaven? Great! Let's add it into the `README.md`.
+ Don't have time to code? No worries! Just tell your friends and subscribers about the project. More users -> more contributors -> more cool features.

A convenient way to run tests is using [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer):

```bash
curl -sSL https://install.python-poetry.org | python3 -
poetry install
poetry run pytest tests
```

Thank you :heart:

![](./assets/flaky.png)

The FlakeHeaven mascot (Flaky) is created by [@illustrator.way](https://www.instagram.com/illustrator.way/) and licensed under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flakeheaven/flakeheaven",
    "name": "flakeheaven",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Gram",
    "author_email": "master_fess@mail.ru",
    "download_url": "https://files.pythonhosted.org/packages/a6/a7/ae6688b2966e40c87633733bd604aa39f40e0dfdce8eae29cc90e7e6e3c1/flakeheaven-3.3.0.tar.gz",
    "platform": null,
    "description": "# FlakeHeaven\n\n[![License: MIT](https://img.shields.io/pypi/l/flakeheaven)](https://opensource.org/licenses/MIT)\n[![python versions](https://img.shields.io/pypi/pyversions/flakeheaven)](https://pypi.org/project/flakeheaven/)\n\n[![version](https://img.shields.io/pypi/v/flakeheaven)](https://pypi.org/project/flakeheaven/)\n[![conda](https://anaconda.org/conda-forge/flakeheaven/badges/version.svg)](https://anaconda.org/conda-forge/flakeheaven)\n[![Downloads](https://img.shields.io/pypi/dm/flakeheaven)](https://pypi.org/project/flakeheaven/)\n\n[![CI](https://github.com/flakeheaven/flakeheaven/actions/workflows/ci.yaml/badge.svg)](https://github.com/flakeheaven/flakeheaven/actions/workflows/ci.yaml)\n[![Docs](https://readthedocs.org/projects/flakeheaven/badge/?version=latest)](https://flakeheaven.readthedocs.io/en/latest/)\n\n\nflakeheaven is a python linter built around flake8 to enable inheritable and complex toml configuration.\n\nThis project is a fork of [FlakeHell](https://github.com/life4/flakehell). FlakeHell and other forks of it such as\nflakehell/flakehell are [no longer maintained](https://github.com/flakehell/flakehell/issues/25) and do not work with Flake8 4.0.x.\n\nFlakeHeaven works with Flake8 4.0.1 or greater. This fork will be [maintained by the community](https://github.com/flakeheaven/flakeheaven/discussions/1) that developed the existing forks.\n\n+ [Lint md, rst, ipynb, and more](https://flakeheaven.readthedocs.io/en/latest/parsers.html).\n+ [Shareable and remote configs](https://flakeheaven.readthedocs.io/en/latest/config.html#base).\n+ [Legacy-friendly](https://flakeheaven.readthedocs.io/en/latest/commands/baseline.html): ability to get report only about new errors.\n+ Caching for much better performance.\n+ [Use only specified plugins](https://flakeheaven.readthedocs.io/en/latest/config.html#plugins), not everything installed.\n+ [Make output beautiful](https://flakeheaven.readthedocs.io/en/latest//formatters.html).\n+ [pyproject.toml](https://www.python.org/dev/peps/pep-0518/) support.\n+ [Check that all required plugins are installed](https://flakeheaven.readthedocs.io/en/latest/commands/missed.html).\n+ [Syntax highlighting in messages and code snippets](https://flakeheaven.readthedocs.io/en/latest/formatters.html#colored-with-source-code).\n+ [PyLint](https://github.com/PyCQA/pylint) integration.\n+ [Powerful GitLab support](https://flakeheaven.readthedocs.io/en/latest/formatters.html#gitlab).\n+ Codes management:\n    + Manage codes per plugin.\n    + Enable and disable plugins and codes by wildcard.\n    + [Show codes for installed plugins](https://flakeheaven.readthedocs.io/en/latest/commands/plugins.html).\n    + [Show all messages and codes for a plugin](https://flakeheaven.readthedocs.io/en/latest/commands/codes.html).\n    + Allow codes intersection for different plugins.\n\n![output example](./assets/grouped.png)\n\n## Compatibility\n\nFlakeHeaven supports all flake8 plugins, formatters, and configs. However, FlakeHeaven has its own beautiful way to configure enabled plugins and codes. So, options like `--ignore` and `--select` are unsupported. You can have flake8 and FlakeHeaven in one project if you want but enabled plugins should be explicitly specified.\n\n## Installation\n\n```bash\npython3 -m pip install --user flakeheaven\n```\n\n## Usage\n\nFirst of all, let's create `pyproject.toml` config:\n\n```toml\n[tool.flakeheaven]\n# optionally inherit from remote config (or local if you want)\nbase = \"https://raw.githubusercontent.com/flakeheaven/flakeheaven/main/pyproject.toml\"\n# specify any flake8 options. For example, exclude \"example.py\":\nexclude = [\"example.py\"]\n# make output nice\nformat = \"grouped\"\n# 80 chars aren't enough in 21 century\nmax_line_length = 90\n# show line of source code in output\nshow_source = true\n\n# list of plugins and rules for them\n[tool.flakeheaven.plugins]\n# include everything in pyflakes except F401\npyflakes = [\"+*\", \"-F401\"]\n# enable only codes from S100 to S199\nflake8-bandit = [\"-*\", \"+S1??\"]\n# enable everything that starts from `flake8-`\n\"flake8-*\" = [\"+*\"]\n# explicitly disable plugin\nflake8-docstrings = [\"-*\"]\n```\n\nShow plugins that aren't installed yet:\n\n```bash\nflakeheaven missed\n```\n\nShow installed plugins, used plugins, specified rules, codes prefixes:\n\n```bash\nflakeheaven plugins\n```\n\n![plugins command output](./assets/plugins.png)\n\nShow codes and messages for a specific plugin:\n\n```bash\nflakeheaven codes pyflakes\n```\n\n![codes command output](./assets/codes.png)\n\nRun flake8 against the code:\n\n```bash\nflakeheaven lint\n```\n\nThis command accepts all the same arguments as Flake8.\n\nRead [the documentation](https://flakeheaven.readthedocs.io/en/latest/) for more information.\n\n## Contributing\n\n1. Add tests when possible (eg for features / fixes / refactor, etc. )\n2. Add your contribution to the code / docs\n3. Ensure your code passes all (both original and your own) tests.\n4. Commit using [proper header](https://www.conventionalcommits.org/en/v1.0.0/)\n5. Create a PR\n\nContributions are welcome! A few ideas where you can contribute:\n\n+ Improve documentation.\n+ Add more tests.\n+ Improve performance.\n+ Found a bug? Fix it!\n+ Made an article about FlakeHeaven? Great! Let's add it into the `README.md`.\n+ Don't have time to code? No worries! Just tell your friends and subscribers about the project. More users -> more contributors -> more cool features.\n\nA convenient way to run tests is using [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer):\n\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\npoetry install\npoetry run pytest tests\n```\n\nThank you :heart:\n\n![](./assets/flaky.png)\n\nThe FlakeHeaven mascot (Flaky) is created by [@illustrator.way](https://www.instagram.com/illustrator.way/) and licensed under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "FlakeHeaven is a [Flake8](https://gitlab.com/pycqa/flake8) wrapper to make it cool.",
    "version": "3.3.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51bca110e3ca8e8fa9dfb8857429f1e0ff3e95005aa12f63c3a6fb07d6b6291f",
                "md5": "492a6c8e35da9be05e4088a9bfc330d0",
                "sha256": "ae246197a178845b30b63fc03023f7ba925cc84cc96314ec19807dafcd6b39a3"
            },
            "downloads": -1,
            "filename": "flakeheaven-3.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "492a6c8e35da9be05e4088a9bfc330d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 46318,
            "upload_time": "2023-04-10T21:36:02",
            "upload_time_iso_8601": "2023-04-10T21:36:02.176958Z",
            "url": "https://files.pythonhosted.org/packages/51/bc/a110e3ca8e8fa9dfb8857429f1e0ff3e95005aa12f63c3a6fb07d6b6291f/flakeheaven-3.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6a7ae6688b2966e40c87633733bd604aa39f40e0dfdce8eae29cc90e7e6e3c1",
                "md5": "8c8246d3491b1d242fa20e597cf319b9",
                "sha256": "eb07860e028ff8dd56cce742c4766624a37a4ce397fd34300254ab623d13047b"
            },
            "downloads": -1,
            "filename": "flakeheaven-3.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8c8246d3491b1d242fa20e597cf319b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 33508,
            "upload_time": "2023-04-10T21:36:03",
            "upload_time_iso_8601": "2023-04-10T21:36:03.998082Z",
            "url": "https://files.pythonhosted.org/packages/a6/a7/ae6688b2966e40c87633733bd604aa39f40e0dfdce8eae29cc90e7e6e3c1/flakeheaven-3.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-10 21:36:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "flakeheaven",
    "github_project": "flakeheaven",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "flakeheaven"
}
        
Elapsed time: 0.13794s