forked from mongodb-labs/django-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
135 lines (123 loc) · 3.67 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
[build-system]
requires = ["setuptools>=65.0"]
build-backend = "setuptools.build_meta"
[project]
name = "django-mongodb"
dynamic = ["version"]
description = "MongoDB backend for Django"
readme = "README.md"
license = {file="LICENSE"}
requires-python = ">=3.10"
authors = [
{ name = "The MongoDB Python Team" },
]
keywords = [
"mongo",
"mongodb",
"pymongo",
"django"
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Framework :: Django",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"django>=5.0,<5.1",
"pymongo>=4.6,<5.0",
]
[project.optional-dependencies]
test = ["pytest>=7"]
docs = [ "sphinx>=7"]
[project.urls]
Homepage = "https://www.mongodb.org"
Documentation = "https://django-mongodb.readthedocs.io"
Source = "https://github.com/mongodb-labs/django-mongodb"
Tracker = "https://github.com/mongodb-labs/django-mongodb/issues"
[tool.setuptools.dynamic]
version = {attr = "django_mongodb.__version__"}
[tool.pytest.ini_options]
minversion = "7"
addopts = ["-ra", "--strict-config", "--strict-markers", "--junitxml=xunit-results/TEST-results.xml"]
testpaths = ["test"]
log_cli_level = "INFO"
norecursedirs = ["test/*"]
faulthandler_timeout = 1500
xfail_strict = true
filterwarnings = [
"error"
]
[tool.mypy]
strict = true
show_error_codes = true
pretty = true
disable_error_code = ["type-arg", "no-any-return"]
[[tool.mypy.overrides]]
module = ["test.*"]
disable_error_code = ["no-untyped-def", "no-untyped-call"]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
]
ignore = [
"PLR", # Design related pylint codes
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"ARG002", # Unused method argument:
"S101", # Use of `assert` detected
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"PLW2901", # `for` loop variable `value` overwritten by assignment target
]
unfixable = []
exclude = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?)|dummy.*)$"
[tool.ruff.lint.per-file-ignores]
".github/workflows/mongodb_settings.py" = [
"S105", # Possible hardcoded password assigned to: "SECRET_KEY"
]
[tool.coverage.report]
exclude_lines = [
"if (.*and +)*_use_c( and.*)*:",
"def has_c",
"def get_version_string",
"^except AttributeError:",
"except ImportError:",
"raise NotImplementedError",
"return NotImplemented",
"_use_c = true",
"if __name__ == '__main__':",
"if TYPE_CHECKING:"
]
partial_branches = ["if (.*and +)*not _use_c( and.*)*:"]
[tool.coverage.html]
directory = "htmlcov"