https://pantsbuild.org/ logo
#general
Title
# general
c

clean-city-64472

10/29/2021, 3:45 AM
Overall I love that BUILD files are now linted with Black but I do kind of wish that it somehow favoured newlines more than it does.
Copy code
pex_binary(name="manage", entry_point="manage.py", dependencies=["src/mysite:mysite", "src/polls:polls"], restartable=True)

VS

pex_binary(
    name="manage", 
    entry_point="manage.py",
    dependencies=[
        "src/mysite:mysite", 
        "src/polls:polls"
    ],
    restartable=True
)
I much prefer the second one - it makes diffs so much more readable. Guessing this is configurable if I look for the option but maybe we want to override the defaults on Black for this use case out of the box?
h

hundreds-father-404

10/29/2021, 3:59 AM
you can force newlines by adding trailing commas! Try rerunning where you put
,
after
restartable
c

clean-city-64472

10/29/2021, 4:00 AM
Oh nice - TIL. Thank you! 🙏🙏
❤️ 1
h

happy-kitchen-89482

10/29/2021, 4:08 AM
You'd think Black would be configurable but it's mostly not
It is very opinionated
b

busy-vase-39202

10/29/2021, 4:17 PM
This looks like a killer tip for the docs. Maybe even have Tailor comment about it?
h

hundreds-father-404

10/29/2021, 4:48 PM
We haven't documented
update-build-files
at all yet. That's something I'll be adding as part of the 2.8 release blog work
👍 2