#34140: Format python code blocks in documentation files
-------------------------------------+-------------------------------------
     Reporter:  Paolo Melchiorre     |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  format,black,snippet,example       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by benjaoming):

 This sounds like a really good idea!

 We have added the mentioned pre-commit hook "blacken-docs" Read the Docs
 codebase. It has worked really well -- aside from "cosmetic" changes, it
 also fixed a couple of wrong indentations.

 Here is the result:
 https://github.com/readthedocs/readthedocs.org/pull/9672

 Perhaps blacken-docs lacks a good option to switch off black'ening for a
 certain code segment. But so far, we haven't had that issue. It's worth
 running it on the entire documentation project to check that there isn't
 any segments that are intentionally non-conformative with black.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34140#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/010701844354f221-0eb57eeb-e61d-4090-858e-4b8ccdabbd36-000000%40eu-central-1.amazonses.com.

Reply via email to