forked from pypi/warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
103 lines (93 loc) · 3.2 KB
/
pyproject.toml
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
[tool.coverage.run]
branch = true
dynamic_context = "test_function"
source = ["warehouse"]
omit = [
# We don't want to get coverage information for our migrations.
"warehouse/migrations/*",
# We don't want to actually cover our __main__.py file because it is hard
# to cover and it really just acts as a tiny shim to a function.
"warehouse/__main__.py",
# Again, tiny shim code that we don't actually need to test and trying to
# do so would just get in the way.
"warehouse/wsgi.py",
# And again, tiny shim code.
"warehouse/celery.py",
]
# We run multiple processes in parallel, so we need to make sure that we don't
# write to the same file at the same time.
parallel = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"class \\w+\\(Interface\\):",
"if (typing\\.)?TYPE_CHECKING:",
]
[tool.curlylint]
include = '\.(html|jinja|txt)$'
# For jinja's i18n extension:
template_tags = [['trans', 'pluralize', 'endtrans']]
[tool.isort]
profile = 'black'
lines_between_types = 1
combine_as_imports = true
known_first_party = ['warehouse', 'tests']
[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
warn_unused_ignores = true
plugins = ["mypy_zope:plugin"]
exclude = ["warehouse/locale/.*", "warehouse/migrations/versions.*"]
cache_dir = "dev/.mypy_cache"
[[tool.mypy.overrides]]
# These modules do not yet have types available.
module = [
"bpython.*", # https://github.com/bpython/bpython/issues/892
"b2sdk.*", # https://github.com/Backblaze/b2-sdk-python/issues/148
"celery.app.backends.*",
"celery.backends.redis.*",
"github_reserved_names.*", # https://github.com/Julian/github-reserved-names/pull/10
"google.cloud.*",
"forcediphttpsadapter.*",
"IPython.*", # has types, but only installed in dev
"packaging_legacy.*", # https://github.com/di/packaging_legacy/pull/5
"paginate.*",
"paginate_sqlalchemy.*",
"premailer.*",
"pymacaroons.*", # https://github.com/ecordell/pymacaroons/issues/41
"pyramid.*", # https://github.com/Pylons/pyramid/issues/2638
"pyramid_jinja2.*",
"pyramid_mailer.*",
"pyramid_retry.*",
"pyramid_rpc.*",
"pyqrcode.*",
"requests_aws4auth.*", # https://github.com/tedder/requests-aws4auth/issues/53
"rfc3986.*", # https://github.com/python-hyper/rfc3986/issues/122
"transaction.*",
"ua_parser.*", # https://github.com/ua-parser/uap-python/issues/110
"venusian.*",
"whitenoise.*", # https://github.com/evansd/whitenoise/pull/410
"zope.sqlalchemy.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = [
"--disable-socket",
"--allow-hosts=localhost,::1,stripe",
"--durations=20",
"--numprocesses=auto",
]
cache_dir = "dev/.pytest_cache"
testpaths = ["tests/"]
markers = [
'unit: Quick running unit tests which test small units of functionality.',
'functional: Slower running tests which test the entire system is functioning.',
]
filterwarnings = [
'ignore::warehouse.utils.exceptions.DevelopmentModeWarning',
'error:SELECT statement has a cartesian product:sqlalchemy.exc.SAWarning',
]
[tool.pip-tools.compile]
# TODO: This can be removed once it becomes the default.
# See: https://github.com/jazzband/pip-tools/issues/989
allow-unsafe = true