-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
113 lines (103 loc) · 3.15 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[isort]
profile = black
skip =
./build,
.nox,
.tox,
.scratch,
_vendor,
data
known_third_party =
pip._vendor
[flake8]
max-line-length = 88
exclude =
./build,
.nox,
.tox,
.scratch,
_vendor,
data
enable-extensions = G
extend-ignore =
G200, G202,
# black adds spaces around ':'
E203,
per-file-ignores =
# G: The plugin logging-format treats every .log and .error as logging.
noxfile.py: G
# B011: Do not call assert False since python -O removes these calls
tests/*: B011
[mypy]
ignore_missing_imports = True
disallow_untyped_defs = True
disallow_any_generics = True
warn_unused_ignores = True
[mypy-pip._vendor.*]
ignore_errors = True
# These vendored libraries use runtime magic to populate things and don't sit
# well with static typing out of the box. Eventually we should provide correct
# typing information for their public interface and remove these configs.
[mypy-pip._vendor.colorama]
follow_imports = skip
[mypy-pip._vendor.pkg_resources]
follow_imports = skip
[mypy-pip._vendor.progress.*]
follow_imports = skip
[mypy-pip._vendor.requests.*]
follow_imports = skip
[mypy-tests.*]
# TODO: The following option should be removed at some point in the future.
allow_untyped_defs = True
[tool:pytest]
addopts = --ignore src/pip/_vendor --ignore tests/tests_cache -r aR --color=yes
markers =
network: tests that need network
incompatible_with_sysconfig
incompatible_with_test_venv
incompatible_with_venv
no_auto_tempdir_manager
unit: unit tests
integration: integration tests
bzr: VCS: Bazaar
svn: VCS: Subversion
mercurial: VCS: Mercurial
git: VCS: git
search: tests for 'pip search'
[coverage:run]
branch = True
# Do not gather coverage for vendored libraries.
omit = */_vendor/*
# Centralized absolute file prefix for coverage files.
data_file = ${COVERAGE_OUTPUT_DIR}/.coverage
# By default, each covered process will try to truncate and then write to
# `data_file`, but with `parallel`, they will write to separate files suffixed
# with hostname, pid, and a timestamp.
parallel = True
# If not set, then at the termination of each worker (when using pytest-xdist),
# the following is traced: "Coverage.py warning: Module pip was previously
# imported, but not measured (module-not-measured)"
disable_warnings = module-not-measured
[coverage:paths]
# We intentionally use "source0" here because pytest-cov unconditionally sets
# "source" after loading the config.
source0 =
# The primary source code path which other paths will be combined into.
src/pip/
# Unit test source directory e.g.
# `.tox/coverage-py3/lib/pythonX.Y/site-packages/pip/...`
*/site-packages/pip/
# Functional test virtual environment directories, which look like
# `tmpdir/pip0/pip/src/pip/...`
*/pip/src/pip/
[coverage:report]
exclude_lines =
# We must re-state the default because the `exclude_lines` option overrides
# it.
pragma: no cover
# This excludes typing-specific code, which will be validated by mypy anyway.
if TYPE_CHECKING
# Can be set to exclude e.g. `if PY2:` on Python 3
${PIP_CI_COVERAGE_EXCLUDES}
[metadata]
license_file = LICENSE.txt