-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpyproject.toml
120 lines (111 loc) · 3.39 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
[tool.poetry]
name = "drf-recaptcha"
version = "4.0.2"
description = "Django rest framework recaptcha field serializer"
authors = ["Lev Lybin <lev.lybin@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/llybin/drf-recaptcha"
repository = "https://github.com/llybin/drf-recaptcha"
keywords = [
"django",
"drf",
"rest",
"django-rest-framework",
"reCAPTCHA",
"reCAPTCHA v2",
"reCAPTCHA v3",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Environment :: Plugins",
"Intended Audience :: Developers",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Security",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[tool.poetry.dependencies]
python = ">=3.10"
django = ">=4.2"
djangorestframework = ">=3.14"
django-ipware = ">=5.0"
[tool.poetry.dev-dependencies]
coverage = { version = "*", extras = ["toml"] }
pytest = "*"
pytest-django = "*"
pytest-cov = "*"
pytest-mock = "*"
pytz = "*"
ruff = "*"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.ruff]
preview = true
target-version = "py310"
src = ["drf_recaptcha"]
[tool.ruff.lint]
select = [
"F", "E", "W", "C", "I", "N", "UP", "YTT", "ASYNC", "S", "BLE", "FBT", "B", "A", "COM", "C4", "DTZ", "T10", "DJ",
"Q", "EM", "FA", "ISC", "ICN", "LOG", "G", "INP", "PIE", "T20", "PYI", "PT", "RSE", "RET", "SLF", "SLOT", "SIM",
"TID", "TCH", "INT", "ARG", "PTH", "TD", "FIX", "ERA", "PGH", "PL", "TRY", "FLY", "PERF", "FURB", "RUF"
]
ignore = [
"INP001", "RUF012", "PLC0415", "COM812", "ISC001",
"S310", "ARG001"
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["ARG001", "S101", "PLR0913", "PLR0917", "PLR2004", "PLR6301", "SLF001"]
"settings.py" = ["E501", "RUF001"]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.settings"
addopts = "-ra --cache-clear --no-cov-on-fail --cov-report=term --cov-report xml:coverage.xml --cov=drf_recaptcha"
console_output_style = "count"
pythonpath = "."
[tool.coverage.run]
branch = true
omit = [
"*__init__*",
"*/tests/*",
]
[tool.coverage.report]
precision = 2
fail_under = 94
show_missing = true
skip_covered = true
ignore_errors = true
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# Have to re-enable the standard pragma:
"pragma: no cover",
"pragma: nocover",
"pragma: full coverage",
# Don't complain TYPE_CHECKING:
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
]