-
Notifications
You must be signed in to change notification settings - Fork 301
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (141 loc) · 4.38 KB
/
Copy pathpyproject.toml
File metadata and controls
160 lines (141 loc) · 4.38 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
[build-system]
requires = ["uv_build>=0.9.6,<0.10.0"]
build-backend = "uv_build"
[project]
name = "django-countries"
version = "9.0.0"
description = "Provides a country field for Django models."
readme = "README.md"
authors = [{ name = "Chris Beaven", email = "smileychris@gmail.com" }]
license = { text = "MIT" }
keywords = ["django", "countries", "flags"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
]
requires-python = ">=3.10"
dependencies = ["asgiref", "typing_extensions"]
[project.urls]
Homepage = "https://github.com/SmileyChris/django-countries/"
"Change Log" = "https://github.com/SmileyChris/django-countries/blob/main/CHANGES.md"
"Source Code" = "https://github.com/SmileyChris/django-countries"
Translations = "https://explore.transifex.com/smileychris/django-countries/"
[project.optional-dependencies]
pyuca = ["pyuca"]
[dependency-groups]
test = [
"pytest",
"pytest-django",
"pytest-cov",
"djangorestframework",
"graphene-django",
"coverage",
"drf-spectacular",
"django-filter>=24.3",
]
dev = [
{ include-group = "test" },
"ruff",
"django",
"mypy>=1.12,<1.16",
"django-stubs>=4.2.7,<5; python_version < '3.9'",
"django-stubs>=5.0.0; python_version >= '3.9'",
"djangorestframework-stubs",
"Pillow",
"types-Pillow",
"bandit",
"docutils",
"Pygments",
"towncrier",
"django-filter-stubs>=0.1.3",
"click>=8.0",
]
docs = ["mkdocs", "mkdocs-material"]
[tool.uv.build-backend]
module-root = ""
source-include = ["LICENSE", "CHANGES.md"]
source-exclude = [".mypy_cache"]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "django_countries.tests.settings"
filterwarnings = ["ignore::DeprecationWarning:graphene"]
[tool.coverage.run]
source = ["django_countries"]
omit = ["django_countries/makesprite.py", "django_countries/tests/settings*.py"]
parallel = true
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "@overload", "if TYPE_CHECKING:"]
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
disallow_untyped_calls = true
python_version = "3.9"
[[tool.mypy.overrides]]
module = "mypy_django_plugin.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "_pytest.*"
follow_imports = "skip"
[tool.django-stubs]
django_settings_module = "django_countries.tests.settings"
[tool.ruff]
line-length = 88
target-version = "py38"
[tool.ruff.lint]
# Enable pycodestyle (E, W), Pyflakes (F), isort (I), pyupgrade (UP)
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"RET", # flake8-return
"SIM", # flake8-simplify
"PERF", # Performance anti-patterns
"TCH", # Type-checking optimizations
"RSE", # Raise statement improvements
"DJ", # Django best practices
"T20", # Print statement detection
]
ignore = [
"DJ008", # Model __str__ not critical for test models
]
[tool.ruff.lint.per-file-ignores]
"django_countries/tests/**" = [
"S101", # Allow asserts in tests
"ARG", # Allow unused arguments in tests
"N802", # Allow test names matching settings
"N806", # Allow Form class variables
]
"django_countries/data.py" = ["T201"] # Allow prints in data generation script
"django_countries/ioc_data.py" = [
"T201",
] # Allow prints in data generation script
"django_countries/graphql/**" = [
"ARG004",
] # GraphQL resolvers must match signature
[tool.ruff.lint.isort]
known-first-party = ["django_countries"]
[tool.bandit]
exclude_dirs = ["/tests"]
[tool.towncrier]
package = "django_countries"
filename = "CHANGES.md"
directory = "changes"
issue_format = "[#{issue}](https://github.com/SmileyChris/django-countries/issues/{issue})"
title_format = "## {version} ({project_date})"