Skip to content

Commit

Permalink
Tune isort configuration
Browse files Browse the repository at this point in the history
* Simplify the isort configuration by removing many unneeded
  customizations.
* Change the line length to 79 so that very long lines can be avoided in
  the imports.
* Use multi_line_output style 4.

The imports are sorted (with isort) too.
  • Loading branch information
suutari-ai committed Jan 26, 2018
1 parent 2faf550 commit 28e0abe
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
3 changes: 2 additions & 1 deletion parkings/api/public/parking_area.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from rest_framework import viewsets
from rest_framework_gis.pagination import GeoJsonPagination
from rest_framework_gis.serializers import GeoFeatureModelSerializer, GeometrySerializerMethodField
from rest_framework_gis.serializers import (
GeoFeatureModelSerializer, GeometrySerializerMethodField)

from parkings.models import ParkingArea

Expand Down
4 changes: 3 additions & 1 deletion parkings/tests/api/enforcement/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

from parkings.models import Operator

from ..utils import ALL_METHODS, check_list_endpoint_base_fields, check_method_status_codes, get
from ..utils import (
ALL_METHODS, check_list_endpoint_base_fields, check_method_status_codes,
get)

list_url = reverse('enforcement:v1:operator-list')

Expand Down
8 changes: 4 additions & 4 deletions parkings/tests/api/enforcement/test_valid_parking.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import pytest
from django.core.urlresolvers import reverse
from django.utils.timezone import utc
from rest_framework.status import HTTP_400_BAD_REQUEST, HTTP_401_UNAUTHORIZED, HTTP_403_FORBIDDEN
from rest_framework.status import (
HTTP_400_BAD_REQUEST, HTTP_401_UNAUTHORIZED, HTTP_403_FORBIDDEN)

from ..utils import (
ALL_METHODS, check_list_endpoint_base_fields, check_method_status_codes, check_response_objects, get,
get_ids_from_results
)
ALL_METHODS, check_list_endpoint_base_fields, check_method_status_codes,
check_response_objects, get, get_ids_from_results)

list_url = reverse('enforcement:v1:valid_parking-list')

Expand Down
4 changes: 3 additions & 1 deletion parkings/tests/api/operator/test_parking.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

from parkings.models import Parking

from ..utils import ALL_METHODS, check_method_status_codes, check_required_fields, delete, patch, post, put
from ..utils import (
ALL_METHODS, check_method_status_codes, check_required_fields, delete,
patch, post, put)

list_url = reverse('operator:v1:parking-list')

Expand Down
4 changes: 3 additions & 1 deletion parkings/tests/api/public/test_parking_area_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

from parkings.models import Parking

from ..utils import check_list_endpoint_base_fields, check_method_status_codes, get, get_ids_from_results
from ..utils import (
check_list_endpoint_base_fields, check_method_status_codes, get,
get_ids_from_results)

list_url = reverse('public:v1:parkingareastatistics-list')

Expand Down
5 changes: 2 additions & 3 deletions parkings/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from pytest_factoryboy import register

from parkings.factories import (
AdminUserFactory, HistoryParkingFactory, OperatorFactory, ParkingAreaFactory, ParkingFactory, StaffUserFactory,
UserFactory
)
AdminUserFactory, HistoryParkingFactory, OperatorFactory,
ParkingAreaFactory, ParkingFactory, StaffUserFactory, UserFactory)

register(OperatorFactory)
register(ParkingFactory, 'parking')
Expand Down
10 changes: 2 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,12 @@ norecursedirs = bower_components node_modules .git .idea
doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE

[isort]
atomic=true
combine_as_imports=false
indent=4
default_section=THIRDPARTY
known_first_party=parkkihubi,parkings
length_sort=false
line_length=120
multi_line_output=5
line_length=79
multi_line_output=4
not_skip=__init__.py
order_by_type=false
skip=migrations,.tox
wrap_length=120

[pydocstyle]
ignore=D100,D104,D105,D200,D203,D400

0 comments on commit 28e0abe

Please sign in to comment.