forked from pypi/warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
110 lines (99 loc) · 3.27 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
104
105
106
107
108
109
110
[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:",
]
# Don't show us anything that's already 100% covered.
skip_covered = true
[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.11"
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 = [
"alembic_postgresql_enum.*",
"automat.*",
"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.*",
"google.cloud.*",
"forcediphttpsadapter.*",
"IPython.*", # has types, but only installed in dev
"linehaul.*",
"packaging_legacy.*",
"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.*",
"transaction.*",
"ua_parser.*", # https://github.com/ua-parser/uap-python/issues/110
"venusian.*",
"whitenoise.*",
"zope.sqlalchemy.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = [
"--disable-socket",
"--allow-hosts=localhost,::1,notdatadog,stripe",
"--durations=20",
"--numprocesses=auto",
]
cache_dir = "dev/.pytest_cache"
norecursedirs = ['build', 'dist', 'node_modules', '*.egg-info', '.state requirements']
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.admin.services.InsecureStorageWarning',
'ignore::warehouse.utils.exceptions.InsecureOIDCPublisherWarning',
'ignore::warehouse.packaging.services.InsecureStorageWarning',
]
[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