Skip to content

Commit dea9cf5

Browse files
committed
Use [isort](https://github.com/timothycrosley/isort) throughout the source.
1 parent 46b1f3c commit dea9cf5

21 files changed

+44
-49
lines changed

cachecontrol/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
__email__ = "[email protected]"
1111
__version__ = "0.12.6"
1212

13-
from .wrapper import CacheControl
1413
from .adapter import CacheControlAdapter
1514
from .controller import CacheController
15+
from .wrapper import CacheControl

cachecontrol/_cmd.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
import logging
6+
from argparse import ArgumentParser
67

78
import requests
89

910
from cachecontrol.adapter import CacheControlAdapter
1011
from cachecontrol.cache import DictCache
1112
from cachecontrol.controller import logger
1213

13-
from argparse import ArgumentParser
14-
1514

1615
def setup_logging():
1716
logger.setLevel(logging.DEBUG)

cachecontrol/adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
import types
65
import functools
6+
import types
77
import zlib
88

99
from requests.adapters import HTTPAdapter
1010

11-
from .controller import CacheController, PERMANENT_REDIRECT_STATUSES
1211
from .cache import DictCache
12+
from .controller import PERMANENT_REDIRECT_STATUSES, CacheController
1313
from .filewrapper import CallbackFileWrapper
1414

1515

cachecontrol/caches/redis_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from __future__ import division
66

77
from datetime import datetime
8+
89
from cachecontrol.cache import BaseCache
910

1011

cachecontrol/controller.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"""
66
The httplib2 algorithms ported for use with requests.
77
"""
8+
import calendar
89
import logging
910
import re
10-
import calendar
1111
import time
1212
from email.utils import parsedate_tz
1313

@@ -16,7 +16,6 @@
1616
from .cache import DictCache
1717
from .serialize import Serializer
1818

19-
2019
logger = logging.getLogger(__name__)
2120

2221
URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?")

cachecontrol/heuristics.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
import calendar
66
import time
7-
8-
from email.utils import formatdate, parsedate, parsedate_tz
9-
107
from datetime import datetime, timedelta
8+
from email.utils import formatdate, parsedate, parsedate_tz
119

1210
TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT"
1311

dev_requirements.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44

55
-e .
66

7-
tox
8-
pytest-cov
9-
pytest
10-
mock
7+
black
8+
bumpversion
119
cherrypy
12-
sphinx
13-
redis
10+
isort
1411
lockfile
15-
bumpversion
12+
mock
13+
pytest
14+
pytest-cov
15+
redis
16+
sphinx
17+
tox
1618
twine
17-
black
1819
wheel

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
# All configuration values have a default; values that are commented out
1616
# serve to show the default.
1717

18-
import sys, os
18+
import os
19+
import sys
1920

2021
# If extensions (or modules to document with autodoc) are in another directory,
2122
# add these directories to sys.path here. If the directory is relative to the

examples/benchmark.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
import sys
6-
import requests
75
import argparse
8-
9-
from multiprocessing import Process
6+
import sys
107
from datetime import datetime
8+
from multiprocessing import Process
119
from wsgiref.simple_server import make_server
10+
11+
import requests
12+
1213
from cachecontrol import CacheControl
1314

1415
HOST = "localhost"

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tool.isort]
2+
line_length = 88
3+
known_first_party = ['cachecontrol']

0 commit comments

Comments
 (0)