-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (126 loc) · 2.8 KB
/
pyproject.toml
File metadata and controls
143 lines (126 loc) · 2.8 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
[project]
name = "geoip2"
version = "5.1.0"
description = "MaxMind GeoIP2 API"
authors = [
{name = "Gregory Oschwald", email = "goschwald@maxmind.com"},
]
dependencies = [
"maxminddb>=2.7.0,<3.0.0",
]
requires-python = ">=3.9"
readme = "README.rst"
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet",
"Topic :: Internet :: Proxy Servers",
]
[project.optional-dependencies]
aiohttp = [
"aiohttp>=3.6.2,<4.0.0",
]
requests = [
"requests>=2.24.0,<3.0.0",
]
[dependency-groups]
dev = [
"pytest>=8.3.5",
"pytest-httpserver>=1.0.10",
"types-requests>=2.32.0.20250328",
]
lint = [
"mypy>=1.15.0",
"ruff>=0.11.6",
]
[build-system]
requires = ["uv_build>=0.7.19,<0.8.0"]
build-backend = "uv_build"
[tool.uv.build-backend]
source-include = [
"HISTORY.rst",
"README.rst",
"LICENSE",
"docs/html",
"examples/*.py",
"tests/*.py",
"tests/data/test-data/*.mmdb"
]
[project.urls]
Homepage = "https://www.maxmind.com/"
Documentation = "https://geoip2.readthedocs.org/"
"Source Code" = "https://github.com/maxmind/GeoIP2-python"
"Issue Tracker" = "https://github.com/maxmind/GeoIP2-python/issues"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Skip type annotation on **_
"ANN003",
# Redundant as the formatter handles missing trailing commas.
"COM812",
# documenting magic methods
"D105",
# Conflicts with D211
"D203",
# Conflicts with D212
"D213",
# Magic numbers for HTTP status codes seem ok most of the time.
"PLR2004",
# pytest rules
"PT009",
"PT027",
]
[tool.ruff.lint.per-file-ignores]
"docs/*" = ["ALL"]
"src/geoip2/{models,records}.py" = [ "D107", "PLR0913" ]
"tests/*" = ["ANN201", "D"]
[tool.tox]
env_list = [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"lint",
]
skip_missing_interpreters = false
[tool.tox.env_run_base]
dependency_groups = [
"dev",
]
commands = [
["pytest", "tests"],
]
[tool.tox.env.lint]
description = "Code linting"
python = "3.13"
extras = [
"aiohttp",
"requests",
]
dependency_groups = [
"dev",
"lint",
]
commands = [
["mypy", "src", "tests"],
["ruff", "check"],
["ruff", "format", "--check", "--diff", "."],
]
[tool.tox.gh.python]
"3.13" = ["3.13", "lint"]
"3.12" = ["3.12"]
"3.11" = ["3.11"]
"3.10" = ["3.10"]
"3.9" = ["3.9"]