Re: Should migrations have their imports sorted?

2015-07-26 Thread Raphael Michel
Am Sat, 25 Jul 2015 16:32:21 -0700 (PDT)
schrieb Tim Graham :
> I think it's been addressed in 1.9 to at least some extent. See 
> https://github.com/django/django/commit/7f20041bca43ca33f0a9617793f2af7ab07c3fab

Oh, I didn't find that. Wonderful, sorry for the noise :)

Raphael

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/20150726110721.557235cc%40kvothe.
For more options, visit https://groups.google.com/d/optout.


pgpA742XfliXB.pgp
Description: Digitale Signatur von OpenPGP


Re: Should migrations have their imports sorted?

2015-07-25 Thread Tim Graham
I think it's been addressed in 1.9 to at least some extent. See 
https://github.com/django/django/commit/7f20041bca43ca33f0a9617793f2af7ab07c3fab

On Saturday, July 25, 2015 at 6:54:40 PM UTC-4, Raphael Michel wrote:
>
> Hello, 
>
> some time ago, Django started to use isort to make sure imports are 
> formatted and sorted consistently throughout the codebase. I like this 
> very much, so I started adopting this practice for my own codebases. 
>
> However, today I noticed that when Django generates a migration, the 
> imports in the outputted python file are not necessarily sorted, 
> causing my checks to fail. In my case it was about these imports: 
>
> -from django.db import models, migrations 
> +from django.db import migrations, models 
>
> I had a short look at the source code, but being a novice to the 
> django.db subtree, I had no idea where exactly to look and I wanted to 
> ask here: Is this something trivial to fix or is it something that 
> cannot be solved without changing things very deeply? 
>
> This is, of course, absolutely not important, if not completely 
> irrelevant. However, if it would be a really easy fix, it could be a 
> nice bonus feature. 
>
> Cheers, 
> Raphael 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a2ea5562-f151-4801-b040-6b0a6e3a0e04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Should migrations have their imports sorted?

2015-07-25 Thread Raphael Michel
Hello,

some time ago, Django started to use isort to make sure imports are
formatted and sorted consistently throughout the codebase. I like this
very much, so I started adopting this practice for my own codebases.

However, today I noticed that when Django generates a migration, the
imports in the outputted python file are not necessarily sorted,
causing my checks to fail. In my case it was about these imports:

-from django.db import models, migrations
+from django.db import migrations, models

I had a short look at the source code, but being a novice to the
django.db subtree, I had no idea where exactly to look and I wanted to
ask here: Is this something trivial to fix or is it something that
cannot be solved without changing things very deeply?

This is, of course, absolutely not important, if not completely
irrelevant. However, if it would be a really easy fix, it could be a
nice bonus feature.

Cheers,
Raphael

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/20150726005423.74fa6353%40kvothe.
For more options, visit https://groups.google.com/d/optout.


pgpyStu8Idok4.pgp
Description: Digitale Signatur von OpenPGP