-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.cfg
141 lines (117 loc) · 4.04 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
###############################################################################
# setuptools / pip configuration
###############################################################################
[bdist_wheel]
universal = 1
###############################################################################
# flake8 configuration
###############################################################################
[flake8]
max-line-length = 88
select =
E,
F,
W,
# https://github.com/PyCQA/flake8-bugbear
B,
# Opinionated warnings with the exception of line-length
B90,
# http://www.pydocstyle.org/en/latest/error_codes.html
# Docstring whitespace issues
D2,
# Multi-line docstring summary should start at the second line, i.e. not
# the same line as the triple quotes
D213,
# Docstring quotes issues
D3,
# First word of the docstring should not be "This"
D404
ignore =
# Our preferred style is line breaks before binary operators
# ref: https://github.com/PyCQA/pycodestyle/issues/498
W503,
# flake8-bugbear's B902 attempts to ensure we use `self` for instance
# methods and `cls` for class methods, but in our codebases it mostly
# reports false-positives when implementing SQLAlchemy hybrid_properties.
B902,
# flake8-bugbear's B903 advises using `collections.namedtuple` for
# data-only classes. Unfortunately, it doesn't take into account
# subclassing where the parent class may have methods.
# Also, use attrs.
B903,
# Black will insert a blank line between a function docstring and an inner function
D202,
# Our docstring style allows for a multi-line summary, e.g.:
#
# """
# Prevent database use without the appropriate fixture/marker, used
# automatically.
#
# Additional content goes here.
# """
D205,
# Inverse of D213
D212
###############################################################################
# pytest connfiguration
###############################################################################
[tool:pytest]
addopts = --strict -ra -v
xfail_strict = true
testpaths = tests
filterwarnings =
# Show any DeprecationWarnings once
once::DeprecationWarning
once::PendingDeprecationWarning
###############################################################################
# coverage.py configuration
###############################################################################
[coverage:run]
source =
pytest_mark_no_py3
tests
branch = True
parallel = True
[coverage:paths]
source =
src/pytest_mark_no_py3
.tox/*/lib/python*/site-packages/pytest_mark_no_py3
[coverage:report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError
# Don't complain if non-runnable code isn't run
if __name__ == .__main__.:
# Don't complain about uncovered code in tests that were supposed to fail
@pytest.mark.xfail
# Always show line numbers of uncovered statements
show_missing = True
###############################################################################
# isort configuration
###############################################################################
[isort]
# Only change a file if the result has correct Python syntax
atomic = True
# Paths to ignore
skip =
.git,
.tox
# Sort `__init__.py`s unless they contain an `# isort:skip_file` comment
not_skip = __init__.py
# Non-stdlib and non-GoodRx code will be treated as third-party
default_section = THIRDPARTY
# GoodRx modules/libraries
known_first_party =
pytest_mark_no_py3,
tests
# Multiple imports from a single module will go on separate lines
force_single_line = True
# Sort alphabetically within each module rather than by type (e.g. class/function)
force_sort_within_sections = True
order_by_type = False
# Longest line-length allowed for a single import. Try to keep this in sync
# with max-line-length in the flake8 config
line_length = 88