Opened 6 years ago

Closed 6 years ago

Last modified 6 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

Description

Migration files, which are automatically created by Django on running python manage.py 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 6 years ago.
PEP8 throwing warnings when ran on migrations directory

Download all attachments as: .zip

Change History (5)

by Aman Sharma, 6 years ago

PEP8 throwing warnings when ran on migrations directory

comment:1 by Carlton Gibson, 6 years ago

Resolution: wontfix
Status: newclosed

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

comment:2 by Adam Johnson, 6 years ago

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

comment:3 by Jarek Glowacki, 6 years ago

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 by Mariusz Felisiak, 6 years ago

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

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