#34085: Black shouldn't format non-Python files
-------------------------------------+-------------------------------------
Reporter: Jeff Triplett | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: startproject black | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Jeff Triplett:
Old description:
> Oliver Andrich on Twitter told me that the `requirements.in` file in my
> startproject was adding spaces after being processed. After a bit more
> digging it appears that Black is being run against non-Python files like
> `requirements.in`, which is a common file pather used with pip-tools and
> pip-compile to create a locked requirements.txt.
> https://twitter.com/oliverandrich/status/1579872988891328513
>
> Ideally, Black should not run on non-Python files <or> it'd be nice to
> have a better exclude option as Carlton pointed out. See:
> https://twitter.com/carltongibson/status/1579888108010868738
New description:
Oliver Andrich on Twitter told me that the `requirements.in` file in my
startproject was adding spaces after being processed. After a bit more
digging it appears that Black is being run against non-Python files like
`requirements.in`, which is a common file pather used with pip-tools and
pip-compile to create a locked requirements.txt.
https://twitter.com/oliverandrich/status/1579872988891328513
Ideally, Black should not run on non-Python files <or> it'd be nice to
have a better exclude option as Carlton pointed out. See:
https://twitter.com/carltongibson/status/1579888108010868738
While I am a fan of Black, I personally think we should have some type of
`--skip-black` or `--skip-formatters` because it's disruptive to have
Black installed globally and have this be opt-in by default.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34085#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070183c82af3fd-ed4d702b-110d-43e4-9798-d2bfb1c84cd7-000000%40eu-central-1.amazonses.com.