Skip to content

Commit 5f70ec4

Browse files
committed
Sort imports and add isort as a check.
1 parent a4d952d commit 5f70ec4

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

setup.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
#!/usr/bin/env python
22
# -*- encoding: utf-8 -*-
3-
from __future__ import absolute_import, print_function
3+
from __future__ import absolute_import
4+
from __future__ import print_function
45

56
import io
6-
from itertools import chain
77
import re
8+
from distutils.command.build import build
89
from glob import glob
10+
from itertools import chain
911
from os.path import basename
1012
from os.path import dirname
1113
from os.path import join
1214
from os.path import splitext
13-
from distutils.command.build import build
1415

1516
from setuptools import Command
1617
from setuptools import find_packages
1718
from setuptools import setup
1819
from setuptools.command.develop import develop
19-
from setuptools.command.install_lib import install_lib
2020
from setuptools.command.easy_install import easy_install
21+
from setuptools.command.install_lib import install_lib
2122

2223

2324
def read(*names, **kwargs):

src/pytest_cov/engine.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Coverage controllers for use by pytest-cov and nose-cov."""
2-
32
import contextlib
43
import copy
54
import os
@@ -10,8 +9,10 @@
109
import coverage
1110
from coverage.data import CoverageData
1211

12+
from .compat import StringIO
13+
from .compat import workerinput
14+
from .compat import workeroutput
1315
from .embed import cleanup
14-
from .compat import StringIO, workeroutput, workerinput
1516

1617

1718
class _NullFile(object):

src/pytest_cov/plugin.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""Coverage plugin for pytest."""
22
import argparse
3-
import coverage
43
import os
5-
import pytest
64
import warnings
5+
6+
import coverage
7+
import pytest
78
from coverage.misc import CoverageException
89

910
from . import compat

tests/test_pytest_cov.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
from process_tests import wait_for_strings
1919
from six import exec_
2020

21+
import pytest_cov.plugin
22+
from pytest_cov import compat
23+
2124
try:
2225
from StringIO import StringIO
2326
except ImportError:
2427
from io import StringIO
2528

26-
import pytest_cov.plugin
27-
from pytest_cov import compat
28-
2929
coverage, platform # required for skipif mark on test_cov_min_from_coveragerc
3030

3131
max_worker_restart_0 = "--max-" + compat.worker + "-restart=0"

tox.ini

+2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ deps =
6767
flake8
6868
readme-renderer
6969
pygments
70+
isort
7071
skip_install = true
7172
usedevelop = false
7273
commands =
7374
python setup.py check --strict --metadata --restructuredtext
7475
check-manifest {toxinidir}
7576
flake8 src tests setup.py
77+
isort --check-only --diff --recursive src tests setup.py

0 commit comments

Comments
 (0)