facebook / usort

Safe, minimal import sorting for Python projects.
https://usort.readthedocs.io
MIT License
189 stars 22 forks source link

Consider handling nested configuration #222

Open amyreese opened 1 year ago

amyreese commented 1 year ago

@ofek in #186 uncovered potential confusion in repos with nested pyproject.toml files, where black appears to also look at the parent project's configuration, while µsort only looks at the nearest configuration. We may need to look at how black handles this, and either use black's API for loading the line length, or extending our configuration loading process to continue searching if no [tool.usort] or [tool.black] sections are found.