Black: Support config in setup.cfg

Created on 30 Jan 2019  路  6Comments  路  Source: psf/black

Today, the config of black is exclusively in pyproject.toml.

However some project relies on setuptools.setup() rather than Flit.

Would it be possible to also store the config in setup.cfg?
Especially since the syntax would be the same?

[tool.black]
line-length = 99
include = \.pyi?$
exclude = \.git
          | \.hg
          | \.mypy_cache
          | \.tox
          | \.venv
          | _build
          | buck-out
          | build
          | dist

Note that other projects like zest.releaser, flake8, twine, wheel already support that.

Most helpful comment

Support for this has been added to https://github.com/odwyersoftware/brunette :+1:

All 6 comments

I would be happy to contribute this, if it makes sense...

Indeed, in our project, we use the setup.cfg file to configure our package metadata, flake8 options, coverage, zest.releaser, etc. Our setup.py is 2 lines long :wink:

I read this comment which made me doubt about what you'd think about this.

note: setup.cfg can read the __version__ attribute instead of parsing source files like it's done here

Let's discuss this in #683.

Support for this has been added to https://github.com/odwyersoftware/brunette :+1:

@richardARPANET maybe we should work on flake8 and other projects to support pyproject.toml?

@JulianVolodia just because the black maintainer is stubborn? Pass

@JulianVolodia just because the black maintainer is stubborn? Pass

sad... but true?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dusty-phillips picture dusty-phillips  路  21Comments

Lukas0907 picture Lukas0907  路  66Comments

Kristinita picture Kristinita  路  28Comments

devxpy picture devxpy  路  70Comments

sfermigier picture sfermigier  路  43Comments