3 ms·
I just tried this on a Django project, and it formatted all the migration files as well. Is there a way to exclude certain directories when formatting a whole p
by spocklivelong 8y ago
I just tried this on a Django project, and it formatted all the migration files as well. Is there a way to exclude certain directories when formatting a whole project?
- ambivalence 8y agoI'm working on that. In the mean time use your Unix fu with `find | grep | grep -v | xargs black`.
- itwy 8y agoSo what? How is that harmful?
- kbd 8y agoI take it it's because the migration files are auto-generated anyway, so it's odd to auto-format previously auto-generated files. You also don't really want to have repository churn on those files since they're generated once (and then never edited again) along with the feature they're for.
- QasimK 8y agoIt would be a one-time auto-format just like the one-time auto-format that black will do for the rest of the project. Any newly auto-generated files can be formatted before they are committed. So I don't see it actually adding to the harm.