{ "info": { "author": "Peter J. A. Cock", "author_email": "p.j.a.cock@googlemail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Flake8", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance" ], "description": "flake8-black\n============\n\n.. image:: https://img.shields.io/pypi/v/flake8-black.svg\n :alt: Released on the Python Package Index (PyPI)\n :target: https://pypi.python.org/pypi/flake8-black\n.. image:: https://img.shields.io/conda/vn/conda-forge/flake8-black.svg\n :alt: Released on Conda\n :target: https://anaconda.org/conda-forge/flake8-black\n.. image:: https://img.shields.io/travis/peterjc/flake8-black/master.svg\n :alt: Testing with TravisCI\n :target: https://travis-ci.org/peterjc/flake8-black/branches\n.. image:: https://img.shields.io/pypi/dm/flake8-black.svg\n :alt: PyPI downloads\n :target: https://pypistats.org/packages/flake8-black\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :alt: Code style: black\n :target: https://github.com/python/black\n\nIntroduction\n------------\n\nThis is an MIT licensed `flake8 `_ plugin\nfor validating Python code style with the command line code formatting tool\n`black `_. It is available to install from\nthe Python Package Index (PyPI):\n\n- https://pypi.python.org/pypi/flake8-black\n\nBlack, *\"The Uncompromising Code Formatter\"*, is normally run to edit your\nPython code in place to match their coding style, a strict subset of the\n`PEP 8 style guide `_.\n\nThe point of this plugin is to be able to run ``black --check ...`` from\nwithin the ``flake8`` plugin ecosystem. You might use this via a ``git``\npre-commit hook, or as part of your continuous integration testing.\n\nFlake8 Validation codes\n-----------------------\n\nEarly versions of flake8 assumed a single character prefix for the validation\ncodes, which became problematic with collisions in the plugin ecosystem. Since\nv3.0, flake8 has supported longer prefixes, therefore this plugin uses ``BLK``\nas its prefix.\n\n====== =======================================================================\nCode Description (*and notes*)\n------ -----------------------------------------------------------------------\nBLK100 Black would make changes.\nBLK9## Internal error (*various, listed below*):\nBLK900 Failed to load file: ...\nBLK901 Invalid input.\nBLK997 Invalid TOML file: ...\nBLK998 Could not access flake8 line length setting (*no longer used*).\nBLK999 Unexpected exception.\n====== =======================================================================\n\nNote that if your Python code has a syntax error, ``black --check ...`` would\nreport this as an error. Likewise ``flake8 ...`` will by default report the\nsyntax error, but importantly it does not seem to then call the plugins, so\nyou will *not* get an additional ``BLK`` error.\n\n\nInstallation\n------------\n\nPython 3.6 or later is required to run ``black``, so that is recommended, but\n``black`` can be used on Python code written for older versions of Python.\n\nYou can install ``flake8-black`` using ``pip``, which should install ``flake8``\nand ``black`` as well if not already present::\n\n $ pip install flake8-black\n\nAlternatively, if you are using the Anaconda packaging system, the following\ncommand will install the plugin with its dependencies::\n\n $ conda install -c conda-forge flake8-black\n\nThe new validator should be automatically included when using ``flake8`` which\nmay now report additional validation codes starting with ``BLK`` (as defined\nabove). For example::\n\n $ flake8 example.py\n\nYou can request only the ``BLK`` codes be shown using::\n\n $ flake8 --select BLK example.py\n\n\nConfiguration\n-------------\n\nWe assume you are familiar with `flake8 configuration\n`_ and\n`black configuration\n`_.\n\nWe recommend using the following settings in your ``flake8`` configuration,\nfor example in your ``.flake8``, ``setup.cfg``, or ``tox.ini`` file::\n\n [flake8]\n # Recommend matching the black line length (default 88),\n # rather than using the flake8 default of 79:\n max-line-length = 88\n extend-ignore =\n # See https://github.com/PyCQA/pycodestyle/issues/373\n E203,\n\nNote currently ``pycodestyle`` gives false positives on the spaces ``black``\nuses for slices, which ``flake8`` reports as ``E203: whitespace before ':'``.\nUntil `pyflakes issue 373 `_\nis fixed, and ``flake8`` is updated, we suggest disabling this style check.\n\nSeparately ``pyproject.toml`` is used for ``black`` configuration - if this\nfile is found, the plugin will look at the following ``black`` settings:\n\n* ``target_version``\n* ``skip_string_normalization``\n* ``line_length``\n\nYou can specify a particular path for the ``pyproject.toml`` file (e.g.\nglobal development settings) using ``--black-config FILENAME`` at the\ncommand line, or using ``black-config = FILENAME`` in your ``flake8``\nconfiguration file.\n\nIgnoring validation codes\n-------------------------\n\nUsing the flake8 no-quality-assurance pragma comment is not recommended\n(e.g. adding ``# noqa: BLK100`` to the first line black would change).\nInstead use the black pragma comments ``# fmt: off`` at the start, and\n``# fmt: on`` at the end, of any region of your code which should not be\nchanged. Or, exlude the entire file by name (see below).\n\n\nIgnoring files\n--------------\n\nThe plugin does *NOT* currently consider the ``black`` settings ``include``\nand ``exclude``, so if you have certain Python files which you do not use\nwith ``black`` and have told it to ignore, you will *also* need to tell\n``flake8`` to ignore them (e.g. using ``exclude`` or ``per-file-ignores``).\n\n\nVersion History\n---------------\n\n======= ============ ===========================================================\nVersion Release date Changes\n------- ------------ -----------------------------------------------------------\nv0.1.1 2019-08-26 - Option to use a (global) black configuration file,\n contribution from\n `Tomasz Grining `_.\n - New ``BLK997`` if can't parse ``pyproject.toml`` file.\n - Logs configuration files, use ``-v`` or ``--verbose``.\n - Fixed flake8 \"builtins\" parameter warning.\n - Now requires black 19.3b0 or later.\nv0.1.0 2019-06-03 - Uses main black settings from ``pyproject.toml``,\n contribution from `Alex `_.\n - WARNING: Now ignores flake8 ``max-line-length`` setting.\nv0.0.4 2019-03-15 - Supports black 19.3b0 which changed a function call.\nv0.0.3 2019-02-21 - Bug fix when ``W292 no newline at end of file`` applies,\n contribution from\n `Sapphire Becker `_.\nv0.0.2 2019-02-15 - Document syntax error behaviour (no BLK error reported).\nv0.0.1 2019-01-10 - Initial public release.\n - Passes flake8 ``max-line-length`` setting to black.\n======= ============ ===========================================================\n\n\nDevelopers\n----------\n\nThis plugin is on GitHub at https://github.com/peterjc/flake8-black\n\nTo make a new release once tested locally and on TravisCI::\n\n $ git tag vX.Y.Z\n $ python setup.py sdist --formats=gztar\n $ twine upload dist/flake8-black-X.Y.Z.tar.gz\n $ git push origin master --tags\n\nThe PyPI upload should trigger an automated pull request updating the\n`flake8-black conda-forge recipe\n`_.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/peterjc/flake8-black", "keywords": "PEP8", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flake8-black", "package_url": "https://pypi.org/project/flake8-black/", "platform": "", "project_url": "https://pypi.org/project/flake8-black/", "project_urls": { "Homepage": "https://github.com/peterjc/flake8-black" }, "release_url": "https://pypi.org/project/flake8-black/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "flake8 plugin to call black as a code style validator", "version": "0.1.1" }, "last_serial": 5730772, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "e1bb38a296422c938e4528cd145a5290", "sha256": "23d206c02f71255c4f31aabab7cc2a9ed7f8aed32589b147d5497f334dfd65fa" }, "downloads": -1, "filename": "flake8-black-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e1bb38a296422c938e4528cd145a5290", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5623, "upload_time": "2019-01-10T14:51:17", "url": "https://files.pythonhosted.org/packages/35/a4/e5d92ab2074f1d15f5313b41d94198c8820d98ecc5acda2488894b499324/flake8-black-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "dc6e58aed5df7349de18663ae147e731", "sha256": "c09289370462597e04f0c0ac497016e7af72027f43d1a50006c392aee6e83ef8" }, "downloads": -1, "filename": "flake8-black-0.0.2.tar.gz", "has_sig": false, "md5_digest": "dc6e58aed5df7349de18663ae147e731", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5822, "upload_time": "2019-02-15T11:36:53", "url": "https://files.pythonhosted.org/packages/51/5e/79e300e60125b907c1c3e7c4e5b983f81a84bad889a7e33a5a17560331b1/flake8-black-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1ce3ec910952cf821639e89454972e63", "sha256": "be751bdf8111285aa644f10176d4b88a0c2d71a87cb3090d442ff89c625931c1" }, "downloads": -1, "filename": "flake8-black-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1ce3ec910952cf821639e89454972e63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5899, "upload_time": "2019-02-21T19:19:02", "url": "https://files.pythonhosted.org/packages/ed/05/f39549d17defbd5cd77164bff75e2f2f2e6ca1456ed44e9877b365461332/flake8-black-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "f28e7a3a45e388390bc98db751c3d709", "sha256": "c5f02ac7ec9c0851ebf79159d298340adc0e9777097a97f2cac4bac09e2cdbeb" }, "downloads": -1, "filename": "flake8-black-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f28e7a3a45e388390bc98db751c3d709", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6014, "upload_time": "2019-03-15T19:44:32", "url": "https://files.pythonhosted.org/packages/7a/92/73d7267a6d886eb530dbc258bf9fe0f19b1cf2cbd17daedebf49e139653c/flake8-black-0.0.4.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "8403092a2f21f90bfde0c56fb8507d51", "sha256": "6b5fe2a609fa750170da8d5b1ed7c11029bceaff025660be7f19307ec6fa0c35" }, "downloads": -1, "filename": "flake8-black-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8403092a2f21f90bfde0c56fb8507d51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6933, "upload_time": "2019-06-03T14:38:06", "url": "https://files.pythonhosted.org/packages/2f/70/668695b45f45257b4370eb324a60a868e6eaef8e99b0ac5d858116365232/flake8-black-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3ad4ba47a8a74aea4ff8d964c92887ef", "sha256": "56f85aaa5a83f06a3f61e680e3b50f156b5e557ebdcb964d823d86f4c108b0c8" }, "downloads": -1, "filename": "flake8-black-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3ad4ba47a8a74aea4ff8d964c92887ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8293, "upload_time": "2019-08-26T13:09:53", "url": "https://files.pythonhosted.org/packages/b6/a8/78f2eb3062fb052509bf6ba0d9643ea31562d52d6947096f1e0009ba5f46/flake8-black-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ad4ba47a8a74aea4ff8d964c92887ef", "sha256": "56f85aaa5a83f06a3f61e680e3b50f156b5e557ebdcb964d823d86f4c108b0c8" }, "downloads": -1, "filename": "flake8-black-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3ad4ba47a8a74aea4ff8d964c92887ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8293, "upload_time": "2019-08-26T13:09:53", "url": "https://files.pythonhosted.org/packages/b6/a8/78f2eb3062fb052509bf6ba0d9643ea31562d52d6947096f1e0009ba5f46/flake8-black-0.1.1.tar.gz" } ] }