#24275: Migration files should comply with PEP8
--------------------------------------+-----------------------------
     Reporter:  darkryder             |      Owner:  f.ssat95@…
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Migrations            |    Version:  master
     Severity:  Normal                |   Keywords:  Migration, PEP8
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+-----------------------------
 The migration statements generated by the
 
[https://github.com/django/django/blob/master/django/db/migrations/writer.py#L123
 MigrationWriter] should preferably be PEP8 compatible. This would ensure
 that when people run flake8 on their apps, they do not stumble
 unnecessarily due to warnings generated in the migration files. [[BR]]
 In order to correct this, I've aimed to create a new class
 
[https://github.com/darkryder/django/commit/405413a94571e52f20841f15480ee6fa0d35b06a
 #diff-7d0e679c6018bf032defd15cf12a2520R41 CleanWriter] that
 MigrationWriter can inherit from, and can use its
 
[https://github.com/darkryder/django/commit/405413a94571e52f20841f15480ee6fa0d35b06a
 #diff-7d0e679c6018bf032defd15cf12a2520R111 clean] function before finally
 preparing the migration file. For lines which still can't be fixed, a `#
 NOQA` comment should be appended.[[BR]]
 Currently there are a couple of bugs in the CleanWriter class, which if
 this ticket gets accepted, I'll fix and then create a PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/24275>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.b08ea27151308ab52c8f0fa398e3bc1a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to