-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (136 loc) · 4.53 KB
/
Copy pathpyproject.toml
File metadata and controls
157 lines (136 loc) · 4.53 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
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "cuid2"
dynamic = ["version"]
authors = [
{name = "Will Gordon", email = "wgordon@redhat.com"},
]
description = "Next generation GUIDs. Collision-resistant ids optimized for horizontal scaling and performance."
readme = "README.md"
requires-python = ">=3.10"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Security :: Cryptography",
"Typing :: Typed"
]
keywords = ['crypt', 'security', 'uuid', 'guid', 'cuid', 'cryptography']
[project.urls]
repository = "https://github.com/gordon-code/cuid2/"
[project.scripts]
cuid2 = "cuid2.cli:main"
[tool.pdm.version]
source = "scm"
[tool.uv]
default-groups = ["lint", "test", "tox", "typing"]
[dependency-groups]
lint = [
"codespell==2.4.3", # https://github.com/codespell-project/codespell (latest: 2.2.6)
"pylint==4.0.7", # https://github.com/pylint-dev/pylint (latest: 3.1.0)
"requests==2.34.2", # https://github.com/psf/requests (latest: 2.31.0)
"ruff==0.16.3", # https://github.com/astral-sh/ruff (latest: 0.3.7)
"safety==3.8.1", # https://github.com/pyupio/safety (latest: 3.8.1)
]
test = [
"pytest==9.1.1", # https://github.com/pytest-dev/pytest (latest: 9.1.1)
"pytest-mock==3.15.1", # https://github.com/pytest-dev/pytest-mock/ (latest: 3.14.0)
"pytest-sugar==1.1.1", # https://github.com/Teemu/pytest-sugar (latest: 1.0.0)
]
tox = [
"tox==4.60.0", # https://github.com/tox-dev/tox (latest: 4.58.0)
"tox-uv==1.36.0", # https://github.com/tox-dev/tox-uv (latest: 1.36.0)
]
typing = [
"mypy==2.3.1", # https://github.com/python/mypy (latest: 1.9.0)
]
[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4
env_list = py3{10,11,12}, check
work_dir = local/.tox
isolated_build = True
[testenv]
runner = uv-venv-lock-runner
description = run unit tests
dependency_groups = test
commands = pytest local/tests
[testenv:check]
runner = uv-venv-lock-runner
description = run linters and typing
package = skip
dependency_groups =
lint
typing
test
commands =
ruff check --fix --exit-zero src/ local/tests/
ruff format src/ local/tests/
codespell src/ local/tests/
pylint src/ local/tests/
mypy src/ local/tests/
safety check --bare
"""
[tool.ruff]
line-length = 120
src = ["src"]
target-version = "py310"
cache-dir = "local/.ruff_cache"
force-exclude = true
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"F", "E", "W", "C90", "I", "N", "ASYNC",
"TRIO", "S", "BLE", "B", "A", "COM", "C4",
"DTZ", "T10", "EM", "FA", "ISC", "ICN",
"G", "INP", "PIE", "T20", "PT", "Q", "RSE",
"RET", "SLF", "SLOT", "SIM", "INT", "ARG",
"PTH", "PGH", "PL", "TRY", "FLY", "PERF",
"LOG", "RUF",
] # purposely not including "DJ", "YTT", "EXE", "PD", "NPY", "FBT" (boolean checking)
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D104", # Missing docstring in public package
"D205", # Blank line required between summary line and description
"D401", # First line should be in imperative mood
"COM812", "ISC001", # Conflict with formatter
]
# Don't automatically remove `print`
# Stop automatically removing unused imports
unfixable = ["T201", "F401", "F841"]
[tool.ruff.lint.per-file-ignores]
# Ignore `assert` in test files (S101), magic values (PLR2004), and private member accessed (SLF001)
"test_*.py" = ["S101", "PLR2004", "SLF001"]
[tool.ruff.lint.isort]
known-first-party = ["src"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
minversion = "8.1"
cache_dir = "local/.pytest_cache"
python_files = "test_*.py"
[tool.pylint.master]
ignore-patterns = "test_.*.py"
[tool.pylint.format]
max-line-length = 120
[tool.pylint.messages_control]
disable = [
"missing-module-docstring",
"missing-class-docstring",
]
[tool.pylint.design]
max-parents = 13
max-args = 10
[tool.pylint.string]
check-quote-consistency = "yes"
[tool.mypy]
cache_dir = "local/.mypy_cache"