File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 8
8
9
9
"""
10
10
11
- from coverage . version import __version__ , __url__ , version_info
11
+ import sys
12
12
13
13
from coverage .control import Coverage , process_startup
14
14
from coverage .data import CoverageData
15
15
from coverage .misc import CoverageException
16
16
from coverage .plugin import CoveragePlugin , FileTracer , FileReporter
17
17
from coverage .pytracer import PyTracer
18
+ from coverage .version import __version__ , __url__ , version_info
18
19
19
20
# Backward compatibility.
20
21
coverage = Coverage
21
22
22
23
# On Windows, we encode and decode deep enough that something goes wrong and
23
24
# the encodings.utf_8 module is loaded and then unloaded, I don't know why.
24
25
# Adding a reference here prevents it from being unloaded. Yuk.
25
- import encodings .utf_8
26
+ import encodings .utf_8 # pylint: disable=wrong-import-position, wrong-import-order
26
27
27
28
# Because of the "from coverage.control import fooey" lines at the top of the
28
29
# file, there's an entry for coverage.coverage in sys.modules, mapped to None.
29
30
# This makes some inspection tools (like pydoc) unable to find the class
30
31
# coverage.coverage. So remove that entry.
31
- import sys
32
32
try :
33
33
del sys .modules ['coverage.coverage' ]
34
34
except KeyError :
Original file line number Diff line number Diff line change @@ -74,9 +74,6 @@ disable=
74
74
too-many-ancestors,
75
75
# Formatting stuff
76
76
superfluous-parens,bad-continuation,
77
- # I'm fine deciding my own import order,
78
- wrong-import-position,
79
- wrong-import-order,
80
77
# Messages that are noisy for now, eventually maybe we'll turn them on:
81
78
invalid-name,
82
79
protected-access,
Original file line number Diff line number Diff line change 9
9
import os
10
10
import sys
11
11
12
+ # Setuptools has to be imported before distutils, or things break.
12
13
from setuptools import setup
13
- from distutils .core import Extension # pylint: disable=no-name-in-module, import-error
14
- from distutils .command .build_ext import build_ext # pylint: disable=no-name-in-module, import-error
15
- from distutils import errors # pylint: disable=no-name-in-module
14
+ from distutils .core import Extension # pylint: disable=no-name-in-module, import-error, wrong-import-order
15
+ from distutils .command .build_ext import build_ext # pylint: disable=no-name-in-module, import-error, wrong-import-order
16
+ from distutils import errors # pylint: disable=no-name-in-module, wrong-import-order
17
+
16
18
17
19
# Get or massage our metadata. We exec coverage/version.py so we can avoid
18
20
# importing the product code into setup.py.
Original file line number Diff line number Diff line change 7
7
This module is run automatically by pytest, to define and enable fixtures.
8
8
"""
9
9
10
- import pytest
11
10
import warnings
12
11
12
+ import pytest
13
+
13
14
from coverage import env
14
15
15
16
You can’t perform that action at this time.
0 commit comments