Opened 3 years ago
Closed 3 years ago
#32818 closed Cleanup/optimization (invalid)
Add pyproject.toml config for black formatter
Reported by: | Cooper Lees | Owned by: | nobody |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
I'm a maintainer of black (https://github.com/psf/black), a python code formatter. I know Django does not use black, but we selected to add it to our CI to test formatting a decent amount of files (~1900) that have formatting changes to try and find bugs when we make changes.
You have some test files and docs generation files that we'd like to exclude. The test files have syntax errors on purpose it seems. The config should effect nothing the Django project cares about.
I've done the PR and it's here: https://github.com/django/django/pull/14488
(sorry if this is spammy and a waste of a ticket, but it was suggested I do so on the PR)
Change History (2)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I really don't understand why this needs to be added to Django. You should be able to add a black configurations to your CI.
I'm not for or against the idea, but out of curiosity, why wouldn't it be easier for you to keep the file in your own repo? That way you wouldn't need to file a PR anytime you wanted to make changes to the file. Is it because the file could potentially be different in multiple versions of Django, and you wouldn't want to have to store multiple versions of the file?