grantjenks / blue

The slightly less uncompromising Python code formatter.
https://blue.readthedocs.io/
Other
387 stars 21 forks source link

[docs request] Examples of pyproject.toml and setup.cfg #100

Open vaughnkoch opened 1 year ago

vaughnkoch commented 1 year ago

Hi, it would be nice to have a few examples in the readme of workingpyproject.toml and setup.cfg files.

In particular, for pyproject.toml, it was not obvious that you have to use [tool.blue] instead of [blue], [tool.black], etc. However, for setup.cfg, you need to use [blue].

This basic pyproject.toml works for me:

[tool.blue]
line-length = 88
target-version = ['py37', 'py38']
include = '\.pyi?$'
color = true
extend-exclude = '''

This basic setup.cfg seems to work as well:

[blue]
line-length = 88
color = true