grantjenks / blue

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

Use flake8 to parse project and user configs for blue #30

Closed grantjenks closed 3 years ago

grantjenks commented 3 years ago

Use flake8 to parse project and user configs for blue

Fixes #24 and #27

grantjenks commented 3 years ago

Does this work if there’s no pyproject.toml? I may need to patch higher in the call stack.

grantjenks commented 3 years ago

Patching in two places is required:

  1. Patch the pyproject.toml parsing to look for the [tool.blue] section.
  2. Patch the config option callback to use flake8 for parsing setup.cfg, tox.ini, and .blue