formate-black


Nameformate-black JSON
Version 0.2.0.post1 PyPI version JSON
download
home_pagehttps://github.com/python-formate/formate-black
SummaryUse black with formate.
upload_time2023-11-22 15:51:10
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT
keywords black formate formatting linting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
==============
formate-black
==============

.. start short_desc

**Use black with formate.**

.. end short_desc


.. start shields

.. list-table::
	:stub-columns: 1
	:widths: 10 90

	* - Tests
	  - |actions_linux| |actions_windows| |actions_macos| |coveralls|
	* - PyPI
	  - |pypi-version| |supported-versions| |supported-implementations| |wheel|
	* - Activity
	  - |commits-latest| |commits-since| |maintained| |pypi-downloads|
	* - QA
	  - |codefactor| |actions_flake8| |actions_mypy|
	* - Other
	  - |license| |language| |requires|

.. |actions_linux| image:: https://github.com/python-formate/formate-black/workflows/Linux/badge.svg
	:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22Linux%22
	:alt: Linux Test Status

.. |actions_windows| image:: https://github.com/python-formate/formate-black/workflows/Windows/badge.svg
	:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22Windows%22
	:alt: Windows Test Status

.. |actions_macos| image:: https://github.com/python-formate/formate-black/workflows/macOS/badge.svg
	:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22macOS%22
	:alt: macOS Test Status

.. |actions_flake8| image:: https://github.com/python-formate/formate-black/workflows/Flake8/badge.svg
	:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22Flake8%22
	:alt: Flake8 Status

.. |actions_mypy| image:: https://github.com/python-formate/formate-black/workflows/mypy/badge.svg
	:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22mypy%22
	:alt: mypy status

.. |requires| image:: https://dependency-dash.repo-helper.uk/github/python-formate/formate-black/badge.svg
	:target: https://dependency-dash.repo-helper.uk/github/python-formate/formate-black/
	:alt: Requirements Status

.. |coveralls| image:: https://img.shields.io/coveralls/github/python-formate/formate-black/master?logo=coveralls
	:target: https://coveralls.io/github/python-formate/formate-black?branch=master
	:alt: Coverage

.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/python-formate/formate-black?logo=codefactor
	:target: https://www.codefactor.io/repository/github/python-formate/formate-black
	:alt: CodeFactor Grade

.. |pypi-version| image:: https://img.shields.io/pypi/v/formate-black
	:target: https://pypi.org/project/formate-black/
	:alt: PyPI - Package Version

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/formate-black?logo=python&logoColor=white
	:target: https://pypi.org/project/formate-black/
	:alt: PyPI - Supported Python Versions

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/formate-black
	:target: https://pypi.org/project/formate-black/
	:alt: PyPI - Supported Implementations

.. |wheel| image:: https://img.shields.io/pypi/wheel/formate-black
	:target: https://pypi.org/project/formate-black/
	:alt: PyPI - Wheel

.. |license| image:: https://img.shields.io/github/license/python-formate/formate-black
	:target: https://github.com/python-formate/formate-black/blob/master/LICENSE
	:alt: License

.. |language| image:: https://img.shields.io/github/languages/top/python-formate/formate-black
	:alt: GitHub top language

.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/formate-black/v0.2.0.post1
	:target: https://github.com/python-formate/formate-black/pulse
	:alt: GitHub commits since tagged version

.. |commits-latest| image:: https://img.shields.io/github/last-commit/python-formate/formate-black
	:target: https://github.com/python-formate/formate-black/commit/master
	:alt: GitHub last commit

.. |maintained| image:: https://img.shields.io/maintenance/yes/2023
	:alt: Maintenance

.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/formate-black
	:target: https://pypi.org/project/formate-black/
	:alt: PyPI - Downloads

.. end shields

Installation
--------------

.. start installation

``formate-black`` can be installed from PyPI.

To install with ``pip``:

.. code-block:: bash

	$ python -m pip install formate-black

.. end installation

Hooks
--------

``formate-black`` provides a single hook for formate_, which allows the black_ code formatter to be used.


``black``
^^^^^^^^^^

Calls black_, using the given keyword arguments as its configuration.

This hook only takes keyword arguments.

The max line length can be provided via the ``line_length`` keyword argument
or in the config_ table as ``line_length``.

The indent can also be set to tabs via the ``use_tabs`` keyword argument
or in the config_ table as ``indent``.

.. _formate: http://formate.readthedocs.io/
.. _black: https://black.readthedocs.io/en/latest/
.. _config: https://formate.readthedocs.io/en/latest/configuration.html#config


Example Configuration
^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: toml

	[hooks]
	reformat-generics = 40
	collections-import-rewrite = 20
	noqa-reformat = 60
	ellipsis-reformat = 70

	[hooks.black]
	priority = 50

	[hooks.black.kwargs]
	string_normalization = false
	magic_trailing_comma = false

	[config]
	indent = "\t"
	line_length = 115

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/python-formate/formate-black",
    "name": "formate-black",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "black,formate,formatting,linting",
    "author": "",
    "author_email": "Dominic Davis-Foster <dominic@davis-foster.co.uk>",
    "download_url": "https://files.pythonhosted.org/packages/f4/57/6955b9318327ca6fd1e559fba00b3578f863fd8ac661e5aea67177bef745/formate_black-0.2.0.post1.tar.gz",
    "platform": "Windows",
    "description": "\n==============\nformate-black\n==============\n\n.. start short_desc\n\n**Use black with formate.**\n\n.. end short_desc\n\n\n.. start shields\n\n.. list-table::\n\t:stub-columns: 1\n\t:widths: 10 90\n\n\t* - Tests\n\t  - |actions_linux| |actions_windows| |actions_macos| |coveralls|\n\t* - PyPI\n\t  - |pypi-version| |supported-versions| |supported-implementations| |wheel|\n\t* - Activity\n\t  - |commits-latest| |commits-since| |maintained| |pypi-downloads|\n\t* - QA\n\t  - |codefactor| |actions_flake8| |actions_mypy|\n\t* - Other\n\t  - |license| |language| |requires|\n\n.. |actions_linux| image:: https://github.com/python-formate/formate-black/workflows/Linux/badge.svg\n\t:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22Linux%22\n\t:alt: Linux Test Status\n\n.. |actions_windows| image:: https://github.com/python-formate/formate-black/workflows/Windows/badge.svg\n\t:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22Windows%22\n\t:alt: Windows Test Status\n\n.. |actions_macos| image:: https://github.com/python-formate/formate-black/workflows/macOS/badge.svg\n\t:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22macOS%22\n\t:alt: macOS Test Status\n\n.. |actions_flake8| image:: https://github.com/python-formate/formate-black/workflows/Flake8/badge.svg\n\t:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22Flake8%22\n\t:alt: Flake8 Status\n\n.. |actions_mypy| image:: https://github.com/python-formate/formate-black/workflows/mypy/badge.svg\n\t:target: https://github.com/python-formate/formate-black/actions?query=workflow%3A%22mypy%22\n\t:alt: mypy status\n\n.. |requires| image:: https://dependency-dash.repo-helper.uk/github/python-formate/formate-black/badge.svg\n\t:target: https://dependency-dash.repo-helper.uk/github/python-formate/formate-black/\n\t:alt: Requirements Status\n\n.. |coveralls| image:: https://img.shields.io/coveralls/github/python-formate/formate-black/master?logo=coveralls\n\t:target: https://coveralls.io/github/python-formate/formate-black?branch=master\n\t:alt: Coverage\n\n.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/python-formate/formate-black?logo=codefactor\n\t:target: https://www.codefactor.io/repository/github/python-formate/formate-black\n\t:alt: CodeFactor Grade\n\n.. |pypi-version| image:: https://img.shields.io/pypi/v/formate-black\n\t:target: https://pypi.org/project/formate-black/\n\t:alt: PyPI - Package Version\n\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/formate-black?logo=python&logoColor=white\n\t:target: https://pypi.org/project/formate-black/\n\t:alt: PyPI - Supported Python Versions\n\n.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/formate-black\n\t:target: https://pypi.org/project/formate-black/\n\t:alt: PyPI - Supported Implementations\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/formate-black\n\t:target: https://pypi.org/project/formate-black/\n\t:alt: PyPI - Wheel\n\n.. |license| image:: https://img.shields.io/github/license/python-formate/formate-black\n\t:target: https://github.com/python-formate/formate-black/blob/master/LICENSE\n\t:alt: License\n\n.. |language| image:: https://img.shields.io/github/languages/top/python-formate/formate-black\n\t:alt: GitHub top language\n\n.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/formate-black/v0.2.0.post1\n\t:target: https://github.com/python-formate/formate-black/pulse\n\t:alt: GitHub commits since tagged version\n\n.. |commits-latest| image:: https://img.shields.io/github/last-commit/python-formate/formate-black\n\t:target: https://github.com/python-formate/formate-black/commit/master\n\t:alt: GitHub last commit\n\n.. |maintained| image:: https://img.shields.io/maintenance/yes/2023\n\t:alt: Maintenance\n\n.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/formate-black\n\t:target: https://pypi.org/project/formate-black/\n\t:alt: PyPI - Downloads\n\n.. end shields\n\nInstallation\n--------------\n\n.. start installation\n\n``formate-black`` can be installed from PyPI.\n\nTo install with ``pip``:\n\n.. code-block:: bash\n\n\t$ python -m pip install formate-black\n\n.. end installation\n\nHooks\n--------\n\n``formate-black`` provides a single hook for formate_, which allows the black_ code formatter to be used.\n\n\n``black``\n^^^^^^^^^^\n\nCalls black_, using the given keyword arguments as its configuration.\n\nThis hook only takes keyword arguments.\n\nThe max line length can be provided via the ``line_length`` keyword argument\nor in the config_ table as ``line_length``.\n\nThe indent can also be set to tabs via the ``use_tabs`` keyword argument\nor in the config_ table as ``indent``.\n\n.. _formate: http://formate.readthedocs.io/\n.. _black: https://black.readthedocs.io/en/latest/\n.. _config: https://formate.readthedocs.io/en/latest/configuration.html#config\n\n\nExample Configuration\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: toml\n\n\t[hooks]\n\treformat-generics = 40\n\tcollections-import-rewrite = 20\n\tnoqa-reformat = 60\n\tellipsis-reformat = 70\n\n\t[hooks.black]\n\tpriority = 50\n\n\t[hooks.black.kwargs]\n\tstring_normalization = false\n\tmagic_trailing_comma = false\n\n\t[config]\n\tindent = \"\\t\"\n\tline_length = 115\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Use black with formate.",
    "version": "0.2.0.post1",
    "project_urls": {
        "Homepage": "https://github.com/python-formate/formate-black",
        "Issue Tracker": "https://github.com/python-formate/formate-black/issues",
        "Source Code": "https://github.com/python-formate/formate-black"
    },
    "split_keywords": [
        "black",
        "formate",
        "formatting",
        "linting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07ef8aa206dd39737ed7d7b26701d666695d14100b0cc496ac52d486beeda86b",
                "md5": "11bb3681a6f0e241d7e31faf50ea969c",
                "sha256": "2f1ee332aeabb25dea85b768442c9ba9eb603f8bf00968af1271ec603bc9f655"
            },
            "downloads": -1,
            "filename": "formate_black-0.2.0.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "11bb3681a6f0e241d7e31faf50ea969c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 13274,
            "upload_time": "2023-11-22T15:51:08",
            "upload_time_iso_8601": "2023-11-22T15:51:08.692398Z",
            "url": "https://files.pythonhosted.org/packages/07/ef/8aa206dd39737ed7d7b26701d666695d14100b0cc496ac52d486beeda86b/formate_black-0.2.0.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4576955b9318327ca6fd1e559fba00b3578f863fd8ac661e5aea67177bef745",
                "md5": "d15ecb220854286f4d2fdb056c58696c",
                "sha256": "c1c27ab65df5e8a243dd5f27385b26964077c351a62bedc49298443943be077c"
            },
            "downloads": -1,
            "filename": "formate_black-0.2.0.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "d15ecb220854286f4d2fdb056c58696c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4714,
            "upload_time": "2023-11-22T15:51:10",
            "upload_time_iso_8601": "2023-11-22T15:51:10.327270Z",
            "url": "https://files.pythonhosted.org/packages/f4/57/6955b9318327ca6fd1e559fba00b3578f863fd8ac661e5aea67177bef745/formate_black-0.2.0.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-22 15:51:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "python-formate",
    "github_project": "formate-black",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "formate-black"
}
        
Elapsed time: 0.15129s