https://pantsbuild.org/ logo
m

modern-wolf-36228

10/26/2021, 1:36 PM
I'm adding this to the
pants.toml
and it doesn't look like it's making any effect 🤔
Copy code
[black]
args = ["--include BUILD"]
f

fast-nail-55400

10/26/2021, 1:53 PM
at least in 2.8.0rc0, BUILD files should be formatted by
./pants update-build-files
(using black)
passing
--include BUILD
to
black
wouldn’t format BUILD files because BUILD files are not considered part of
python_library
(
python_sources
in 2.8.0rc0) targets and would not have been put in the execution sandbox for
black
to operate on
👍 1
h

happy-kitchen-89482

10/26/2021, 3:46 PM
What @fast-nail-55400 said - before 2.8 we couldn't use Pants to format its own BUILD files due to a data modeling limitation. In 2.8 you can do so, but with
update-build-files
.
5 Views