This release is a pre-release and may not be stable for production use.
black-configparser
Seamless proxy CLI for black ("The uncompromising code formatter")
with support for non-pyproject.toml config files.
Table of Contents
About the Project
The black-configparser is yet another tool (next to brunette,
white, and maybe a few more out there),
which tries to fill the gap of missing setup.cfg
(or just any other non-pyproject.toml) config file.
Why it is different?
Unlike other tools, tries to stay dumb simple and add only minimum needed overhead to black usage.
- It is seamless - it works on the same CLI command -
black- just passing logic through some extra code! - There is no complex argument processing, if config file is present, the values set there are passed directly to
black. - Code of this tool is independent from
blackinsides and will work properly as long asblackwon't make any braking changes in its command line options.
Installation
$ pip install black-configparser
Usage
- Supported configuration files:
setup.cfg,tox.ini. - Configuration file section:
[black]or[tools:black].
Important! ⚠️
- When you
black-configparserfinds black configuration in any of supported file(s), most black's built-in command line arguments become unavailable.
Exceptions:--check--code--diff--help--verbose--version
- The
black-configparsercan be temporarily disabled, by adding--no-config-fileflag toblackcommand, for example:$ black --no-config-file --check ./path/to/file.py
Example configuration
[black]
line-length = 120
target-version =
py27
py33
py34
py35
py36
py37
py38
pyi = True
skip-string-normalization = True
color = True
include = \.pyi?$
exclude = /(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist)/
force-exclude = lorem ipsum
quiet = True
verbose = True
- Almost any option available for black (
black --help) can be put onto config file. - Values for multi-value arguments must be one per line (separated by
\nchar). - Flags (arguments without values) must be set in config file as
= True.
Known issues
- Undefined behavior, when running with one of allowed CLI arguments which is also set in the config file.
- After
black-configparserpackage is uninstalled, theblackcommand does not work anymore and black package must be reinstalled.
License
MIT
Metadata
Release files for black-configparser 0.2.0b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| black-configparser-0.2.0b2.tar.gz | 5.8 kB | Without provenance | Details for black-configparser-0.2.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| black_configparser-0.2.0b2-py3-none-any.whl | Python 3 | none | any | Details for black_configparser-0.2.0b2-py3-none-any.whl |
Total release size: 12.3 kB
Release files / black-configparser-0.2.0b2.tar.gz
| Download URL | black-configparser-0.2.0b2.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60412e20bdef7c699b512e32f5f17a2b1310546fc670718e93b24bb64c79c5bb
|
|
BLAKE2b-256 checksum How to use checksums |
670122a746e2af3c6191770816970a1f061f3c65e99e2fd99fd653db0efd4ccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12
|
Release files / black_configparser-0.2.0b2-py3-none-any.whl
| Download URL | black_configparser-0.2.0b2-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a17f4e73a416303fa41641df22168234b54fce9c97f101697c731b726782b0d8
|
|
BLAKE2b-256 checksum How to use checksums |
656d0f30b29810c08123c4a48869a489d5134fc5f8053e4850f7ee6a9249daa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12
|
Security for black-configparser 0.2.0b2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.