-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (119 loc) · 2.86 KB
/
pyproject.toml
File metadata and controls
134 lines (119 loc) · 2.86 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
[project]
name = "geoip2"
version = "5.2.0"
description = "MaxMind GeoIP2 API"
authors = [
{name = "Gregory Oschwald", email = "goschwald@maxmind.com"},
]
dependencies = [
"aiohttp>=3.6.2,<4.0.0",
"maxminddb>=3.0.0,<4.0.0",
"requests>=2.24.0,<3.0.0",
]
requires-python = ">=3.10"
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.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Internet :: Proxy Servers",
]
[dependency-groups]
dev = [
"pytest>=8.3.5",
"pytest-httpserver>=1.0.10",
"tox-uv>=1.29.0",
"types-requests>=2.32.0.20250328",
]
lint = [
"mypy>=1.15.0",
"ruff>=0.11.6",
]
[build-system]
requires = ["uv_build>=0.10.0,<0.11.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 = [
# 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" = [ "ANN401", "D107", "PLR0913" ]
# FBT003: We use assertIs with boolean literals to verify values are actual
# booleans (True/False), not just truthy/falsy values
"tests/*" = ["ANN201", "D", "FBT003"]
[tool.tox]
env_list = [
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
"lint",
]
skip_missing_interpreters = false
[tool.tox.env_run_base]
runner = "uv-venv-lock-runner"
dependency_groups = [
"dev",
]
commands = [
["pytest", "tests"],
]
[tool.tox.env.lint]
description = "Code linting"
python = "3.14"
dependency_groups = [
"dev",
"lint",
]
commands = [
["mypy", "src", "tests"],
["ruff", "check"],
["ruff", "format", "--check", "--diff", "."],
]
[tool.tox.gh.python]
"3.14" = ["3.14", "lint"]
"3.13" = ["3.13"]
"3.12" = ["3.12"]
"3.11" = ["3.11"]
"3.10" = ["3.10"]