deshaw / pyflyby

A set of productivity tools for Python
https://deshaw.github.io/pyflyby/
Other
353 stars 52 forks source link

tidy-imports --black with custom line length (PyInf#11045) #264

Closed sac111gp closed 11 months ago

sac111gp commented 1 year ago

This is a request for below 2 items:

Bug fix:

  1. Make tidy-imports --black respect black's configured line length (e.g., via pyproject.toml)

Enhancement:

  1. Make tidy-imports --black --width respect line length. Currently, it is a known and documented behavior in --help of --black option:
    
    --black             Use black to format imports. If this option is used,
                        all other formatting options are ignored.

We'd like to allow configuring line length via `--width` as well when used with `black`.