-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
housekeeping: sort imports #761
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #761 +/- ##
===========================================
- Coverage 98.13% 98.11% -0.02%
===========================================
Files 15 15
Lines 1123 1117 -6
===========================================
- Hits 1102 1096 -6
Misses 21 21
Continue to review full report at Codecov.
|
743931e
to
0611bae
Compare
@carltongibson rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tony I'm happy with the sorting but I don't like the indentation change.
(I'll add an inline comment for the ones I mean.
@@ -1,17 +1,15 @@ | |||
from __future__ import absolute_import | |||
from __future__ import unicode_literals | |||
from __future__ import absolute_import, unicode_literals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of combination is OK
from django.utils.encoding import force_str | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .utils import handle_timezone | ||
from .widgets import RangeWidget, LookupTypeWidget, CSVWidget, BaseCSVWidget | ||
from .widgets import BaseCSVWidget, CSVWidget, LookupTypeWidget, RangeWidget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, fine.
django_filters/filters.py
Outdated
) | ||
from .fields import (BaseCSVField, BaseRangeField, DateRangeField, | ||
DateTimeRangeField, IsoDateTimeField, Lookup, | ||
LookupTypeField, RangeField, TimeRangeField) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even this is OK, although...
@carltongibson could you pick one from here? https://isort.readthedocs.io/en/latest/#multi-line-output-modes |
tests/test_filtering.py
Outdated
ModelMultipleChoiceFilter, | ||
MultipleChoiceFilter, NumberFilter, | ||
OrderingFilter, RangeFilter, | ||
TimeRangeFilter, TypedMultipleChoiceFilter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These I'd prefer One Per Line, with a single indent.
from django_filters.filters import (
AllValue...,
etc
)
tests/test_filters.py
Outdated
MultipleChoiceFilter, NumberFilter, | ||
NumericRangeFilter, OrderingFilter, | ||
RangeFilter, TimeFilter, TimeRangeFilter, | ||
TypedMultipleChoiceFilter, UUIDFilter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the one I don't like.
(One per line with a single indent by preference.)
tests/test_filterset.py
Outdated
DateRangeFilter, Filter, FilterMethod, | ||
ModelChoiceFilter, | ||
ModelMultipleChoiceFilter, NumberFilter, | ||
UUIDFilter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, the change is fine but One Per Line with a single indent. 🙂
@carltongibson Just rebased, how do you like it now? |
Yes. I like it a lot. 😄 |
@@ -3,3 +3,6 @@ license-file = LICENSE | |||
|
|||
[wheel] | |||
universal=1 | |||
|
|||
[isort] | |||
multi_line_output=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good isort-foo
Annnnnd @carltongibson broke Give me a sec and I'll rebase them. |
Yes. Of course I did. Oops. |
housekeeping: sort imports
Run module and tests through isort