-
Notifications
You must be signed in to change notification settings - Fork 257
/
pyproject.toml
83 lines (71 loc) · 1.99 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
[tool.poetry]
name = "django-modeltranslation"
version = "0.19.0"
description = "Translates Django models using a registration approach."
authors = ["Peter Eschler <[email protected]>"]
maintainers = ["Serhii Tereshchenko <[email protected]>"]
packages = [
{ include = "modeltranslation" },
]
[tool.poetry.dependencies]
python = ">=3.9,<4"
django = ">=4.2"
typing-extensions = {version = ">=4.0.1", python = "<3.11"}
[tool.poetry.group.dev.dependencies]
ruff = "*"
pdbpp = "*"
parameterized = "*"
pytest-cov = "*"
pytest = "*"
pytest-sugar = "*"
pytest-django = "*"
django-stubs = "^5.0.2"
mypy = "*"
build = "*"
[tool.poetry.group.lsp]
optional = true
[tool.poetry.group.lsp.dependencies]
python-lsp-server = {extras = ["rope"], version = "^1.11.0"}
pylsp-mypy = "^0.6.8"
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
ignore = [
"E501", # line length is handled by formatter
]
[tool.ruff.lint.pyflakes]
extend-generics = [
"django.db.models.ForeignKey",
"django.db.models.OneToOneField",
"django.db.models.ManyToManyField",
"django.db.models.Manager",
"django.db.models.manager.RelatedManager",
]
[tool.mypy]
python_version = "3.9"
incremental = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
show_error_context = true
exclude = [
'tests/migrations/',
'tests/urls.py',
]
disable_error_code = ["method-assign"]
plugins = ["mypy_django_plugin.main"]
[[tool.mypy.overrides]]
module = ["modeltranslation.fields"]
disable_error_code = ["attr-defined", "has-type", "misc"]
[[tool.mypy.overrides]]
module = ["modeltranslation.admin"]
disable_error_code = ["override", "attr-defined"]
[[tool.mypy.overrides]]
module = ["modeltranslation.translator"]
disable_error_code = ["override", "attr-defined"]
[[tool.mypy.overrides]]
module = ["modeltranslation.manager"]
disable_error_code = ["override", "attr-defined", "return-value", "misc"]
[tool.django-stubs]
django_settings_module = "modeltranslation.tests.settings"