#33476: Formatting Code with Black
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  Mariusz
         Type:                       |  Felisiak
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  4.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:3 Nikita Marchant]:
 > The DEP also
 [https://github.com/django/deps/blob/main/accepted/0008-black.rst#specification
 mentions that] "All code Django generates will also be Black-formatted
 (startproject, migrations, inspectdb, etc.)" but there is nothing in the
 "Reference Implementation" part that specifies how to do this.
 >
 > There is a [https://groups.google.com/g/django-
 developers/c/AECpvCTtK_4/m/6iL3eIUCBAAJ mention on the mailing-list] of
 maybe using django-migrations-formatter. Would upstreaming the feature be
 a welcome contribution (the license - BSD - matches) for this ticket ?
 >
 > Also,  would reformatting files in `django/conf/project_template/` and
 `django/conf/app_template/` (by hand, they are not all valid python) to
 follow Black style be a welcome contribution ? (Note that this can not
 guarantee that the generated files will be Black formatted, especially
 when templates variables are very long and Black would want to wrap lines)

 As far as I'm aware, we'd like to use a different approach, i.e. run
 `black` on generated files but only when it's installed.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33476#comment:4>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.9ef517d598efe6368707bdfb44ab8548%40djangoproject.com.

Reply via email to