{"id":15641012,"url":"https://github.com/danie1k/python-black-configparser","last_synced_at":"2025-03-29T21:44:16.330Z","repository":{"id":56446552,"uuid":"308126732","full_name":"danie1k/python-black-configparser","owner":"danie1k","description":"Seamless Proxy CLI for black (\"The uncompromising code formatter\") with support for non-pyproject.toml config files.","archived":false,"fork":false,"pushed_at":"2020-11-08T15:47:03.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T22:09:44.662Z","etag":null,"topics":["black","cli","formatter","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/black-configparser/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danie1k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-28T19:57:39.000Z","updated_at":"2021-12-17T11:49:26.000Z","dependencies_parsed_at":"2022-08-15T18:50:58.026Z","dependency_job_id":null,"html_url":"https://github.com/danie1k/python-black-configparser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danie1k%2Fpython-black-configparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danie1k%2Fpython-black-configparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danie1k%2Fpython-black-configparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danie1k%2Fpython-black-configparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danie1k","download_url":"https://codeload.github.com/danie1k/python-black-configparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249227,"owners_count":20747167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["black","cli","formatter","python"],"created_at":"2024-10-03T11:40:57.704Z","updated_at":"2025-03-29T21:44:16.305Z","avatar_url":"https://github.com/danie1k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/danie1k/python-black-configparser.svg?branch=master)](https://travis-ci.org/danie1k/python-black-configparser)\n[![Code Coverage](https://codecov.io/gh/danie1k/python-black-configparser/branch/master/graph/badge.svg?token=A496BD37Qj)](https://codecov.io/gh/danie1k/python-black-configparser)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/black-configparser)](https://pypi.org/project/black-configparser/)\n[![PyPI](https://img.shields.io/pypi/v/black-configparser)](https://pypi.org/project/black-configparser/)\n[![MIT License](https://img.shields.io/github/license/danie1k/python-black-configparser)](https://github.com/danie1k/python-black-configparser/blob/master/LICENSE)\n[![Automatic PyPI Release](https://github.com/danie1k/python-black-configparser/workflows/PyPi%20Release/badge.svg)](https://github.com/danie1k/python-black-configparser/actions)\n\n# black-configparser\n\nSeamless proxy CLI for [black](https://pypi.org/project/black/) *(\"The uncompromising code formatter\")*\nwith support for non-`pyproject.toml` config files.\n\n\n## Table of Contents\n\n1. [About the Project](#about-the-project)\n    - [Why it is different?](#why-it-is-different)\n1. [Installation](#installation)\n1. [Usage](#usage)\n    - [Example configuration](#)\n1. [Known issues](#known-issues)\n1. [License](#license)\n\n\n## About the Project\n\nThe `black-configparser` is yet another tool *(next to [brunette](https://pypi.org/project/brunette/),\n[white](https://pypi.org/project/white/), and maybe a few more out there)*,\nwhich tries to fill [the gap of missing `setup.cfg`](https://github.com/psf/black/issues/688)\n(or just [any other non-`pyproject.toml`](https://github.com/psf/black/issues/683)) config file.\n\n\n### Why it is different?\n\nUnlike other tools, tries to stay **dumb simple** and add only minimum needed overhead to `black` usage.\n\n1. It is **seamless** - it works on the same CLI command - `black` - just passing logic through some extra code!\n1. There is no complex argument processing, if config file is present, the values set there are passed directly to `black`.\n1. Code of this tool is independent from `black` insides and will work properly\n   as long as `black` won't make any braking changes in its command line options.\n\n\n## Installation\n\n```\n$ pip install black-configparser\n```\n\n\n## Usage\n\n- Supported configuration files: `setup.cfg`, `tox.ini`.\n- Configuration file section: `[black]` or `[tools:black]`.\n\n**Important!** :warning:  \n- When you `black-configparser` finds black configuration in any of supported file(s),\n    most black's built-in command line arguments become unavailable.  \n    Exceptions:\n    - `--check`\n    - `--code`\n    - `--diff`\n    - `--help`\n    - `--verbose`\n    - `--version`\n- The `black-configparser` can be temporarily disabled, by adding `--no-config-file` flag to `black` command,\n    for example:\n    ```\n    $ black --no-config-file --check ./path/to/file.py\n    ```\n\n### Example configuration\n\n```ini\n[black]\nline-length = 120\ntarget-version =\n  py27\n  py33\n  py34\n  py35\n  py36\n  py37\n  py38\npyi = True\nskip-string-normalization = True\ncolor = True\ninclude = \\.pyi?$\nexclude = /(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|\\.svn|_build|buck-out|build|dist)/\nforce-exclude = lorem ipsum\nquiet = True\nverbose = True\n```\n\n- Almost any option available for black (`black --help`) can be put onto config file.\n- Values for multi-value arguments must be one per line (separated by `\\n` char).\n- Flags *(arguments without values)* must be set in config file as `= True`.\n\n\n## Known issues\n\n- Undefined behavior, when running with one of allowed CLI arguments which is also set in the config file.\n- After `black-configparser` package is uninstalled, the `black` command does not work anymore\n    and [black](https://pypi.org/project/black/) package must be reinstalled.\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanie1k%2Fpython-black-configparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanie1k%2Fpython-black-configparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanie1k%2Fpython-black-configparser/lists"}