Skip to content

Commit 9f9e644

Browse files
committed
Use [isort](https://github.com/timothycrosley/isort) throughout the source.
1 parent 42a3aa5 commit 9f9e644

21 files changed

+46
-49
lines changed

cachecontrol/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
__email__ = "[email protected]"
77
__version__ = "0.12.6"
88

9-
from .wrapper import CacheControl
109
from .adapter import CacheControlAdapter
1110
from .controller import CacheController
11+
from .wrapper import CacheControl

cachecontrol/_cmd.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import logging
2+
from argparse import ArgumentParser
23

34
import requests
45

56
from cachecontrol.adapter import CacheControlAdapter
67
from cachecontrol.cache import DictCache
78
from cachecontrol.controller import logger
89

9-
from argparse import ArgumentParser
10-
1110

1211
def setup_logging():
1312
logger.setLevel(logging.DEBUG)

cachecontrol/adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import types
21
import functools
2+
import types
33
import zlib
44

55
from requests.adapters import HTTPAdapter
66

7-
from .controller import CacheController, PERMANENT_REDIRECT_STATUSES
87
from .cache import DictCache
8+
from .controller import PERMANENT_REDIRECT_STATUSES, CacheController
99
from .filewrapper import CallbackFileWrapper
1010

1111

cachecontrol/caches/redis_cache.py

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

33
from datetime import datetime
4+
45
from cachecontrol.cache import BaseCache
56

67

cachecontrol/controller.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
The httplib2 algorithms ported for use with requests.
33
"""
4+
import calendar
45
import logging
56
import re
6-
import calendar
77
import time
88
import traceback
99
from email.utils import parsedate_tz
@@ -13,7 +13,6 @@
1313
from .cache import DictCache
1414
from .serialize import Serializer
1515

16-
1716
logger = logging.getLogger(__name__)
1817

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

cachecontrol/heuristics.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import calendar
22
import time
3-
4-
from email.utils import formatdate, parsedate, parsedate_tz
5-
63
from datetime import datetime, timedelta
4+
from email.utils import formatdate, parsedate, parsedate_tz
75

86
TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT"
97

dev_requirements.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
-e .
22

3-
tox
4-
pytest-cov
5-
pytest
6-
mock
3+
black
4+
bumpversion
75
cherrypy
8-
sphinx
9-
redis
6+
isort
107
lockfile
11-
bumpversion
8+
mock
9+
pytest
10+
pytest-cov
11+
redis
12+
sphinx
13+
tox
1214
twine
13-
black
1415
wheel

docs/conf.py

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

14-
import sys, os
14+
import os
15+
import sys
1516

1617
# If extensions (or modules to document with autodoc) are in another directory,
1718
# 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
@@ -1,10 +1,11 @@
1-
import sys
2-
import requests
31
import argparse
4-
5-
from multiprocessing import Process
2+
import sys
63
from datetime import datetime
4+
from multiprocessing import Process
75
from wsgiref.simple_server import make_server
6+
7+
import requests
8+
89
from cachecontrol import CacheControl
910

1011
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)