-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
161 lines (140 loc) · 3.98 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
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
161
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "tatsu_api"
description = "An unofficial, async-ready wrapper for the Tatsu API."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.9"
version = "2.0.0.dev0"
keywords = ["python", "python-3", "tatsu", "tatsu-api"]
authors = [{ name = "Sachaa-Thanasius", email = "[email protected]" }]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = ["aiohttp>=3.8"]
[project.optional-dependencies]
speed = ["aiohttp[speedups]>=3.8"]
test = ["pytest", "pytest-asyncio"]
dev = ["pre-commit", "typing-extensions"]
[project.urls]
Homepage = "https://github.com/Sachaa-Thanasius/tatsu-api"
Issues = "https://github.com/Sachaa-Thanasius/tatsu-api/issues"
Source = "https://github.com/Sachaa-Thanasius/tatsu-api"
[tool.setuptools]
packages = ["tatsu_api"]
[tool.setuptools.package-data]
tatsu_api = ["py.typed"]
# -------- Test config
[tool.pytest.ini_options]
pythonpath = "src"
addopts = ["--import-mode=importlib", "--strict-markers", "--strict-config"]
asyncio_default_fixture_loop_scope = "module"
# -------- Linter config
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"F",
"E",
"I",
"UP",
"YTT",
"ANN",
"ASYNC",
"S",
"BLE",
# "FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"EM",
"ISC",
"G",
"INP",
"PIE",
"T20",
"PYI",
"PT",
"RSE",
"RET",
"SIM",
"TID",
"PTH",
"ERA",
"PL",
"TRY",
"PERF",
"FURB",
"RUF",
]
ignore = [
# ---- General
"S101", # Use of assert here is a known quantity for typing cases. All uses should be safe to optimize out.
"SIM105", # Suppressable exception. contextlib.suppress is a stylistic choice with overhead.
"C90", # McCabe complexity.
"ANN204", # Special method return types are usually implicit and/or known by type checker.
"ANN401", # Any is needed for some annotations.
"UP038", # isinstance performs better with tuples than unions.
"PT001", # pytest recommends against empty parentheses on pytest.fixture.
"PD011", # Erroneous issue that triggers for any .values attribute access at all.
"PLR2004", # "Magic number" depends on the use case.
"RUF002", # "Ambiguous character" depends on the use case.
"RUF003", # "Ambiguous character" depends on the use case.
"RUF022", # __all__ ordering can be meaningful.
"RUF023", # __slots__ ordering can be meaningful.
# ---- Recommended by Ruff when using Ruff format
"E111",
"E114",
"E117",
"E501",
"COM812",
"COM819",
"ISC001",
"ISC002",
# ---- Project-specific
# Readability
"RET505", # el(se|if) after return.
]
unfixable = [
"ERA", # Prevent unlikely erroneous deletion.
]
[tool.ruff.per-file-ignores]
"examples/*.py" = ["INP001", "T201"] # Leave the examples folder alone.
"test_tatsu.py" = [
"ANN201", # Return annotations.
]
[tool.ruff.isort]
lines-after-imports = 2
combine-as-imports = true
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
# -------- Type-checker config
[tool.pyright]
include = ["tatsu_api"]
pythonVersion = "3.9"
pythonPlatform = "All"
typeCheckingMode = "strict"
reportPrivateUsage = "none"
reportUnnecessaryIsInstance = "information"
reportCallInDefaultInitializer = "warning"
reportImportCycles = "information"
reportPropertyTypeMismatch = "error"
reportShadowedImports = "error"
reportUnnecessaryTypeIgnoreComment = "warning"