-
-
Notifications
You must be signed in to change notification settings - Fork 282
/
pyproject.toml
147 lines (134 loc) · 3.47 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
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
142
143
144
145
146
147
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
[project]
name = "django-payments"
authors = [
{name = "Mirumee Software", email = "[email protected]"},
]
description = "Universal payment handling for Django"
readme = "README.rst"
requires-python = ">=3.7"
keywords = ["payments"]
license = {text = "BSD"}
classifiers = [
"Environment :: Web Environment",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"Django>=3.2",
"requests>=1.2.0",
"django-phonenumber-field[phonenumberslite]>=5.0.0",
]
dynamic = ["version"]
[project.optional-dependencies]
braintree = ["braintree>=3.14.0"]
cybersource = ["suds-community>=0.6"]
dev = [
"coverage",
"django-stubs[compatible-mypy]",
"mock",
"pytest",
"pytest-cov",
"pytest-django",
"types-braintree",
"types-dj-database-url",
"types-requests",
"types-stripe",
"types-xmltodict",
]
docs = ["sphinx_rtd_theme"]
mercadopago = ["mercadopago>=2.0.0,<3.0.0"]
sagepay = ["cryptography>=1.1.0"]
sofort = ["xmltodict>=0.9.2"]
stripe = ["stripe>=2.6.0"]
[project.urls]
homepage = "https://github.com/jazzband/django-payments"
documentation = "https://django-payments.readthedocs.io/"
changelog = "https://django-payments.readthedocs.io/en/latest/changelog.html"
issues = "https://github.com/jazzband/django-payments/issues"
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
]
[tool.mypy]
ignore_missing_imports = true
plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
django_settings_module = "test_settings"
[tool.pytest.ini_options]
addopts =[
"--cov=payments",
"--cov-report=term-missing:skip-covered",
"--no-cov-on-fail",
"--color=yes",
]
testpaths = "payments"
DJANGO_SETTINGS_MODULE = "test_settings"
pythonpath = "."
[tool.ruff]
target-version = "py38"
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"I",
# "N", # TODO: fixing these would break public API
"UP",
"YTT",
# "ANN",
# "BLE",
# "FBT",
"B",
# "A", # Conflicts with some django patterns
"C4",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"PYI",
# "PT", # TODO: some tests are not pytest
"Q",
"RSE",
"RET",
# "SIM", # TODO
"TID",
"TCH",
"INT",
"ERA",
"PGH",
"PLE",
"RUF",
]
ignore = [
"RUF012", # FIXME
]
[tool.ruff.lint.isort]
force-single-line = true
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
# Fails with auto-generated migrations. Unsolvable contradiction between ruff and mypy.
# This likely needs to be addressed in Django itself (either use an immutable
# type or annotate these fields as ClassVar)
"testapp/testapp/testmain/migrations/0*.py"= ["RUF012"]
[tool.setuptools_scm]
write_to = "payments/version.py"
version_scheme = "post-release"
[tool.setuptools.packages.find]
include = ["payments*"]