-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
90 lines (76 loc) · 2.67 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
[aliases]
# Define this so we don't resolve to the wrong setuptools 'test' entrypoint when
# invoking brazil-build test.
test = brazil_test
# Shorter, easier command to run the static type checker
mypy = brazilpython_mypy
# This is needed so the setting below has effect
build_sphinx = amazon_doc_utils_build_sphinx
# Configuration for pytest; enable coverage for inclusive_search_fairness_measurement, emit
# XML, HTML, and terminal reports.
[tool:pytest]
xfail_strict = true
addopts =
--verbose
--ignore=build/private
--cov inclusive_search_fairness_measurement
--cov-report term-missing
--cov-report html:build/brazil-documentation/coverage
--cov-report xml:build/brazil-documentation/coverage/coverage.xml
# show the slowest 5 tests at the end
--durations=5
# Default to colorful output
--color=yes
# Uncomment to enforce a minimum code coverage threshold.
# --cov-fail-under 50
testpaths = test
looponfailroots = src test
# Additional coverage.py settings. The parallel flag and source values are
# necessary so that pytest-cov knows to alias the brazil build artifact absolute
# paths to the relative ones from your package source.
[coverage:run]
branch = true
parallel = true
[coverage:paths]
source =
src/
build/lib/*/site-packages/
[coverage:html]
directory = build/brazil-documentation/coverage
[coverage:xml]
output = build/brazil-documentation/coverage/coverage.xml
# Code formatting configuration.
[brazilpython_formatters]
include = test
formatters = black,isort
autopep8_opts =
--max-line-length=100
[brazilpython_flake8]
include =
test
[flake8]
ignore =
# Not pep8, black adds whitespace before ':'
E203,
# Not pep8, black adds line break before binary operator
W503,
# Once `bb format` is done with things, the only remaining long lines do not
# matter; we can ignore them.
E501,
max_line_length = 100
# Uncomment to enforce a maximum cyclomatic complexity - more info https://en.wikipedia.org/wiki/Cyclomatic_complexity
# max_complexity=10
[mypy]
# See https://mypy.readthedocs.io/en/latest/config_file.html for more mypy options.
# Enables the type-checker on the interior of functions without type annotations.
check_untyped_defs = True
# Displaying specific error codes makes it easier to silence specific errors
# See also https://mypy.readthedocs.io/en/latest/error_codes.html
show_error_codes = True
# Show source code snippets and location markers in error messages
pretty = True
# Suppresses errors about packages which do not implement type-hint sharing.
# See also https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports.
ignore_missing_imports = True
[build_sphinx]
warning-is-error = 1