-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
C: configurationCLI and configurationCLI and configurationT: enhancementNew feature or requestNew feature or request
Description
I am often dealing with projects that produce multiple libraries from the same repository, which looks a bit like:
src/lib1/pyproject.toml
src/lib1/setup.py
src/lib2/pyproject.toml
src/lib2/setup.py
All libs need to follow the same formatting rules, which means that the black configuration has to be duplicated in each pyproject.toml file.
A possible way to avoid the duplication could be to teach black to handle the already existing --config option when it is provided inside the normal pyproject.toml. Basically something like:
src/lib1/pyproject.toml
src/lib1/setup.py
src/lib2/pyproject.toml
src/lib2/setup.py
src/black.toml
with each pyproject.toml containing:
[tool.black]
config = '../black.toml'
A relative path would be interpreted relative to the folder containing the pyproject.toml file.
Thoughts? Would this be a welcome contribution?
jenarvaezg, StarLightPL, AllanLeanderRostockHansen, mackdelany, jasonwbarnett and 1 more
Metadata
Metadata
Assignees
Labels
C: configurationCLI and configurationCLI and configurationT: enhancementNew feature or requestNew feature or request