hundreds-father-404
10/16/2021, 4:24 PM./pants update-build-files
use Black by default, or you have to opt into it with an option? Beyond autoformatting, the goal automates fixing some safe deprecations like renaming target names
+ for opt-out, - for opt-in. Comments also welcomed :)curved-television-6568
10/16/2021, 4:52 PMhundreds-father-404
10/16/2021, 4:53 PMpants.backend.python
to get this feature
Or, if you have Python but aren't ready for Pants to run on in. Activating pants.backend.python
would result in Python insisting with ./pants tailor
that it adds targets for Python code[black].interpreter_constraints
here. What about [black].args
?)How about using black by default if that backend is listed in backend_packages in the configuration?Also generally I think it's a smell to have to document "The default depends if you set this other option." Makes it harder to reason about things. Keep It Simple
curved-television-6568
10/16/2021, 5:00 PMhundreds-father-404
10/16/2021, 5:08 PMupdate-build-files
. Even if they don't like Black for their own code, I imagine people are less opinionated with the formatting style of their BUILD files, as they're implementation details of a tool they use.
So my personal vote is +1 to on-by-default, but then in our 2.8 release blog, maybe share a tip for existing users to use --no-update-build-files-autoformat
the first timecurved-television-6568
10/16/2021, 5:10 PMhundreds-father-404
10/16/2021, 5:12 PM--autoformat
and --fix-safe-deprecations
with default True
for both
Not sure if we need --fix-safe-deprecations
to get more granular, like --fixes=['renamed_targets', 'pex_entry_point']
. I don't think so, seems like overkill. Emphasis that the goal only does safe changes like renames