-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.cfg
125 lines (107 loc) · 3.32 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
###############################################################################
# flake8 configuration
###############################################################################
[flake8]
max-line-length = 85
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,
# Allow `== None` for SQLAlchemy queries
E711,
# Allow `== True` for SQLAlchemy queries
E712,
# 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,
# 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,
# Allow before/after whitespaces in oneline docstrings
D210,
# Inverse of D213
D212
exclude =
.git,
.tox,
.cache,
.coverage,
__pycache__
###############################################################################
# pytest connfiguration
###############################################################################
[tool:pytest]
addopts = --strict -ra --tb=short
testpaths = tests
###############################################################################
# coverage.py configuration
###############################################################################
[coverage:run]
source =
pyramid_default_cors,
tests
branch = True
parallel = True
[coverage:report]
# 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
# Non-stdlib and non-GoodRx code will be treated as third-party
default_section = THIRDPARTY
# GoodRx modules/libraries
known_first_party =
pyramid_default_cors,
tests
sections =
FUTURE,
STDLIB,
THIRDPARTY,
FIRSTPARTY,
LOCALFOLDER
# 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 = 85