On the commandline when running black I can set `-...
# general
p
On the commandline when running black I can set
--extend-exclude
If I run
black --extend-exclude=foo/ -v foo/
I see that all of foo is skipped.. as expected. I can't recreate this with the black config options in pants.toml
Copy code
[black]
args = ["--extend-exclude=observatory_api/", "-v"]
install_from_resolve = "black"
Still runs against all of observatory_api/ Any advice on how to debug?
b
pants --keep-sandboxes=always ...
Is always a great debugging tool
p
Yeah I see the exclude in the __run.sh.. but it is still running 😕
b
I think you may want force exclude
Because the file gets passed on cmdline and the normal excluders apply to file discovery
p
YUP
Thank you again for the help.
b
Alternatively, set the
skip_black
field on the target
p
Unfortunately, observatory_api is a swagger generated library then we have the tooling that runs pants tailor observatory_api following generation. Is there a way to tell pants to add to a BUILD? I'm thinking like builddozer and buildifier from bazel.
b
90% of the time buildozer works
It trips up on f-strings though, if you're doing anything dynamic