Skip to content

Commit 2854679

Browse files
blueyedtomchristie
authored andcommitted
Upgrade isort (#5817)
* Fix isort * runtests: add --diff to ISORT_ARGS * requirements-codestyle: bump isort to 4.3.3 * isort: move config to setup.cfg
1 parent 2bc7cd1 commit 2854679

File tree

12 files changed

+18
-19
lines changed

12 files changed

+18
-19
lines changed

.isort.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

requirements/requirements-codestyle.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ flake8-tidy-imports==1.1.0
44
pycodestyle==2.3.1
55

66
# Sort and lint imports
7-
isort==4.2.15
7+
isort==4.3.3

rest_framework/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from collections import OrderedDict
1212

1313
from django.conf import settings
14-
from django.core.exceptions import ValidationError as DjangoValidationError
1514
from django.core.exceptions import ObjectDoesNotExist
15+
from django.core.exceptions import ValidationError as DjangoValidationError
1616
from django.core.validators import (
1717
EmailValidator, RegexValidator, URLValidator, ip_address_validators
1818
)

rest_framework/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from base64 import b64decode, b64encode
99
from collections import OrderedDict, namedtuple
1010

11-
from django.core.paginator import Paginator as DjangoPaginator
1211
from django.core.paginator import InvalidPage
12+
from django.core.paginator import Paginator as DjangoPaginator
1313
from django.template import loader
1414
from django.utils import six
1515
from django.utils.encoding import force_text

rest_framework/parsers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
from django.conf import settings
1212
from django.core.files.uploadhandler import StopFutureHandlers
1313
from django.http import QueryDict
14+
from django.http.multipartparser import ChunkIter
1415
from django.http.multipartparser import \
1516
MultiPartParser as DjangoMultiPartParser
16-
from django.http.multipartparser import (
17-
ChunkIter, MultiPartParserError, parse_header
18-
)
17+
from django.http.multipartparser import MultiPartParserError, parse_header
1918
from django.utils import six
2019
from django.utils.encoding import force_text
2120
from django.utils.six.moves.urllib import parse as urlparse

rest_framework/reverse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"""
44
from __future__ import unicode_literals
55

6-
from django.urls import reverse as django_reverse
76
from django.urls import NoReverseMatch
7+
from django.urls import reverse as django_reverse
88
from django.utils import six
99
from django.utils.functional import lazy
1010

rest_framework/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import traceback
1818
from collections import Mapping, OrderedDict
1919

20-
from django.core.exceptions import ValidationError as DjangoValidationError
2120
from django.core.exceptions import ImproperlyConfigured
21+
from django.core.exceptions import ValidationError as DjangoValidationError
2222
from django.db import models
2323
from django.db.models import DurationField as ModelDurationField
2424
from django.db.models.fields import Field as DjangoModelField

rest_framework/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from django.core.handlers.wsgi import WSGIHandler
1313
from django.test import override_settings, testcases
1414
from django.test.client import Client as DjangoClient
15-
from django.test.client import RequestFactory as DjangoRequestFactory
1615
from django.test.client import ClientHandler
16+
from django.test.client import RequestFactory as DjangoRequestFactory
1717
from django.utils import six
1818
from django.utils.encoding import force_bytes
1919
from django.utils.http import urlencode

runtests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
FLAKE8_ARGS = ['rest_framework', 'tests']
1515

16-
ISORT_ARGS = ['--recursive', '--check-only', '-o' 'uritemplate', '-p', 'tests', 'rest_framework', 'tests']
16+
ISORT_ARGS = ['--recursive', '--check-only', '--diff', '-o' 'uritemplate', '-p', 'tests', 'rest_framework', 'tests']
1717

1818

1919
def exit_on_failure(ret, message=None):

setup.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ license_file = LICENSE.md
77
[flake8]
88
ignore = E501
99
banned-modules = json = use from rest_framework.utils import json!
10+
11+
[isort]
12+
skip=.tox
13+
atomic=true
14+
multi_line_output=5
15+
known_standard_library=types
16+
known_third_party=pytest,_pytest,django
17+
known_first_party=rest_framework

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy