Re: [Django] #27182: Some import statement use backslashes instead of parentheses

2016-12-16 Thread Django
#27182: Some import statement use backslashes instead of parentheses
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  1.10
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Django will adapt as soon as isort fixes
 [https://github.com/timothycrosley/isort/issues/466 the issue]. I don't
 see a need to keep a ticket open for it here.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6a8d0589b52e80bf2bc587f8f4e9d27a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27182: Some import statement use backslashes instead of parentheses

2016-09-05 Thread Django
#27182: Some import statement use backslashes instead of parentheses
-+-
 Reporter:  cjerdonek|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * stage:  Accepted => Someday/Maybe


Comment:

 Bumping to Someday/Maybe as it's not actionable until the isort issue
 fixed. I explained in #27173 why changing isort's `max_line_length` isn't
 desired.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.85cd86cdfcbd13874b203251f07c36a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27182: Some import statement use backslashes instead of parentheses

2016-09-05 Thread Django
#27182: Some import statement use backslashes instead of parentheses
--+
 Reporter:  cjerdonek |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by cjerdonek):

 For the record, most (or perhaps all, I haven't checked) of these
 occurrences would also go away if Django's `line_length` isort setting
 (direct link
 
[https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/setup.cfg#L15
 here]) were increased from 79 to something longer like 119. Even though
 Django's coding style permits up to 119 characters, the isort
 configuration setting has the effect of making 79 a hard limit instead of
 a soft one in the case of import statements.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c890fa25d8e29dc06eb46ed0e75e5b35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27182: Some import statement use backslashes instead of parentheses

2016-09-05 Thread Django
#27182: Some import statement use backslashes instead of parentheses
--+
 Reporter:  cjerdonek |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by aaugustin):

 * component:  Uncategorized => Core (Other)
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 That would indeed be nice to fix. We have always been at war with
 backslashes.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b4ddcd8f8105d23ae985c1ada6e69ded%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27182: Some import statement use backslashes instead of parentheses

2016-09-05 Thread Django
#27182: Some import statement use backslashes instead of parentheses
---+--
 Reporter:  cjerdonek  |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by cjerdonek):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> Some import statements in Django's code base use backslashes to break
> long lines instead of parentheses (at least 21 occurrences if you search
> the code base for "`import \`"). Here is one example (direct link
> [https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/django/contrib/gis/db/backends/mysql/base.py#L1
> here]):
>
> {{{#!python
> from django.db.backends.mysql.base import \
> DatabaseWrapper as MySQLDatabaseWrapper
> }}}
>
> These go against Django's coding style standards, which
> [https://docs.djangoproject.com/en/dev/internals/contributing/writing-
> code/coding-style/#imports say in the "Imports" section to use
> parentheses]:
>
>  Break long lines using parentheses and indent continuation lines by 4
> spaces.
>
> Django's coding style also says to follow PEP 8, which says this:
>
>  The preferred way of wrapping long lines is by using Python's implied
> line continuation inside parentheses, brackets and braces. Long lines can
> be broken over multiple lines by wrapping expressions in parentheses.
> These should be used in preference to using a backslash for line
> continuation.
>
> I believe this issue is caused by a bug in isort, since the isort section
> of Django's `setup.cfg`
> [https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/setup.cfg#L16
> already sets] `multi_line_output=5` (which means to use parentheses). I
> tried filing an issue about this
> [https://github.com/timothycrosley/isort/issues/466 here].

New description:

 Some import statements in Django's code base use backslashes to break long
 lines instead of parentheses (at least 21 occurrences if you search the
 code base for "`import \`"). Here is one example (direct link
 
[https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/django/contrib/gis/db/backends/mysql/base.py#L1
 here]):

 {{{#!python
 from django.db.backends.mysql.base import \
 DatabaseWrapper as MySQLDatabaseWrapper
 }}}

 These go against Django's coding style standards, which say in the
 "Imports" section
 [https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
 /coding-style/#imports to use parentheses]:

  Break long lines using parentheses and indent continuation lines by 4
 spaces.

 Django's coding style also says to follow PEP 8, which says this:

  The preferred way of wrapping long lines is by using Python's implied
 line continuation inside parentheses, brackets and braces. Long lines can
 be broken over multiple lines by wrapping expressions in parentheses.
 These should be used in preference to using a backslash for line
 continuation.

 I believe this issue is caused by a bug in isort, since the isort section
 of Django's `setup.cfg`
 
[https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/setup.cfg#L16
 already sets] `multi_line_output=5` (which means to use parentheses). I
 tried filing an issue about this
 [https://github.com/timothycrosley/isort/issues/466 here].

--

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.fe04dd022a20c7f45679d3d14255f85f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27182: Some import statement use backslashes instead of parentheses

2016-09-05 Thread Django
#27182: Some import statement use backslashes instead of parentheses
---+
 Reporter:  cjerdonek  |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Uncategorized  |Version:  1.10
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 Some import statements in Django's code base use backslashes to break long
 lines instead of parentheses (at least 21 occurrences if you search the
 code base for "`import \`"). Here is one example (direct link
 
[https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/django/contrib/gis/db/backends/mysql/base.py#L1
 here]):

 {{{#!python
 from django.db.backends.mysql.base import \
 DatabaseWrapper as MySQLDatabaseWrapper
 }}}

 These go against Django's coding style standards, which
 [https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
 /coding-style/#imports say in the "Imports" section to use parentheses]:

  Break long lines using parentheses and indent continuation lines by 4
 spaces.

 Django's coding style also says to follow PEP 8, which says this:

  The preferred way of wrapping long lines is by using Python's implied
 line continuation inside parentheses, brackets and braces. Long lines can
 be broken over multiple lines by wrapping expressions in parentheses.
 These should be used in preference to using a backslash for line
 continuation.

 I believe this issue is caused by a bug in isort, since the isort section
 of Django's `setup.cfg`
 
[https://github.com/django/django/blob/9a2a52558e080f109a27d40a033a135c9d0e7e50/setup.cfg#L16
 already sets] `multi_line_output=5` (which means to use parentheses). I
 tried filing an issue about this
 [https://github.com/timothycrosley/isort/issues/466 here].

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.7dbdbc15301853f74893064176b191b8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.