-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
114 lines (99 loc) · 2.51 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
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
[build-system]
requires = ["maturin>=1.7,<2.0"]
build-backend = "maturin"
[project]
name = "xiangting"
version = "2.0.1"
description = "Python bindings for xiangting"
authors = [{ name = "Apricot S." }]
license = { text = "MIT License" }
readme = "README.md"
requires-python = ">=3.12"
keywords = ["mahjong"]
classifiers = [
"Private :: Do Not Upload",
"License :: OSI Approved :: MIT License",
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.urls]
Repository = "https://github.com/Apricot-S/xiangting-py"
[dependency-groups]
dev = [
{ include-group = "lint" },
{ include-group = "test" },
{ include-group = "docs" },
{ include-group = "typing" },
{ include-group = "build" },
]
lint = [
"ruff>=0.7.1,<0.8",
]
test = [
"pytest>=8.3.3,<9",
"pytest-benchmark>=5.1.0,<6",
"mahjong>=1.2.1",
]
docs = [
"sphinx>=8.1.3,<9",
"sphinx-rtd-theme>=3.0.1,<4",
"scanpydoc[typehints]>=0.14.1",
]
typing = [
"mypy>=1.13.0,<2",
]
build = [
"maturin>=1.7.1",
]
[tool.maturin]
features = ["pyo3/extension-module"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--benchmark-skip"
[tool.ruff]
target-version = "py312"
src = ["python"]
line-length = 79
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D", # pydocstyle
# "C901", # complex-structure
"ANN002", # missing-type-args
"ANN003", # missing-type-kwargs
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"TD002", # missing-todo-author
"TD003", # missing-todo-link
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
]
[tool.ruff.lint.isort]
known-first-party = ["xiangting", "tests"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 72
ignore-overlong-task-comments = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"docs/**.py" = ["ALL"]
[tool.ruff.lint.extend-per-file-ignores]
"./examples/*" = [
"S101", # assert
"INP001", # implicit-namespace-package
"PLR2004", # magic-value-comparison
]
"./tests/*" = [
"S101", # assert
]
[tool.mypy]
exclude = ["^docs/.*\\.py$"]
[[tool.mypy.overrides]]
module = ["pytest_benchmark.*", "mahjong.*"]
ignore_missing_imports = true