ale
ale copied to clipboard
Python black doesn't respect ignored files in their config files
Unlike flake8
, black doesn't have a --stdin-display-name
option. Because of that it will ignore excluded files from the config since ale is passing the buffer through stdin to the command.
Is there a workaround it? Or is it black's responsibility to add something like that in their api?
Just opened an issue there too to check to see if that is possible: https://github.com/psf/black/issues/1776
Hello, I see that the problem got solved on Black's side of things, but I am unable to get ALE to skip Black formatting for excluded files, even using the force-exclude
option in pyproject.toml
.
Is there any extra configuration required to get ALE + Black + excluded files to work as desired?
Encountering this same problem, and found since this issue was opened that Black added --stdin-filename
which would enable excludes to be respected when using Black's force-exclude
.
I guess the implementation would be something similar to #4414, which added similar functionality in ALE for the Ruff linter and fixer.