Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#30555 closed Bug (wontfix)

Migration files generated do not follow PEP8 E501 rule

Reported by: Aman Sharma Owned by: nobody
Component: Migrations Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Migration files, which are automatically created by Django on running python makemigrations, do not seem to follow PEP8 guidelines completely. The rule E501 line too long is not respected in the file. I have attached a file to support my arguments.

Attachments (1)

Screenshot from 2019-06-08 11-40-35.png (37.1 KB) - added by Aman Sharma 5 years ago.
PEP8 throwing warnings when ran on migrations directory

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by Aman Sharma

PEP8 throwing warnings when ran on migrations directory

comment:1 Changed 5 years ago by Carlton Gibson

Resolution: wontfix
Status: newclosed

This isn’t something worth addressing. I suggest you add migrations folders to the flake8 exclude list.

comment:2 Changed 4 years ago by Adam Johnson

...or run Black on your codebase, like Django will :)

comment:3 Changed 4 years ago by Jarek Glowacki

Ooh really?

It's a little inconsistent currently, with how the dependencies list (from makemigrations) gets nicely newlined, whereas the replaces list (from squashmigrations) doesn't.

This has been a little pet peeve of mine for yonks, where replaces lists are difficult to interact with when doing manual migration tinkering, but I never got round to raising a ticket for it..

Despite this being closed as a wontfix, would a PR still be accepted if one were submitted? :D

comment:4 Changed 4 years ago by Mariusz Felisiak

No, if a ticket is wontfix then we will close PR.

Note: See TracTickets for help on using tickets.
Back to Top