-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
161 lines (146 loc) · 2.76 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 = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
# PEP-621 (standard project specification) will be part of Poetry 2.0
# https://github.com/python-poetry/roadmap/issues/3
# until then, use [tool.poetry] instead of [project]
name = "google-re2-stubs"
description = "Typestubs for google-re2"
authors = ["Donald Nguyen"]
license = "MIT"
version = "0.1.1"
readme = "README.md"
packages = [
{ include = "re2-stubs", from = "src" }
]
[tool.poetry.dependencies]
google-re2 = ">=1.0"
python = "^3.8.0"
[tool.poetry.group.dev.dependencies]
pyright = "^1.1.365"
mypy = "^1.10.0"
ruff = "^0.4.7"
pytest = "^8.3.3"
[tool.ruff]
force-exclude = true
line-length = 88
target-version = "py38"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"B",
"C",
"COM",
"D",
"DTZ",
"E",
"ERA",
"EXE",
"F",
"FA",
"FBT",
"FIX",
"G",
"I",
"ICN",
"INP",
"ISC002",
"N",
"NPY",
"PD",
"PERF",
"PGH",
"PIE",
"PL",
"PLC",
"PLR",
"PT",
"PTH",
"PYI",
"Q",
"RET",
"RSE",
"RUF",
"SIM",
"SLF",
"SLOT",
"T10",
"T20",
"TD",
"TID",
"TRY",
"UP",
"W",
"YTT",
]
ignore = [
# Conflicts with ruff format
"COM812",
# Allow explicit concatenation
"ISC003",
# Having issue link with TODO is not necessary
"TD003",
# Allow TODO to exist
"FIX002",
# Do not complain about raising exception without arguments
"RSE102",
# Allow non-trivial exception messages
"TRY003",
# Allow use of print
"T201",
# Don't require docstrings on public methods
"D102",
# Don't require docstrings on public functions
"D103",
# Don't require docstrings on magic methods
"D105",
# Don't complain about __init__ method docstrings
"D107",
# Commented out code is allowed
"ERA001",
# We use `+` to concat long log messages across lines
"G003",
]
[tool.ruff.lint.per-file-ignores]
"src/**.pyi" = [
"N801",
"N802",
"N818",
"FBT001",
"FBT002",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 8
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.isort]
known-first-party = [
"re2",
]
[tool.pyright]
include = ["src", "tests"]
typeCheckingMode = "strict"
# Enable additional checks beyond strict
reportCallInDefaultInitializer = "error"
reportImplicitOverride = "error"
reportImplicitStringConcatenation = "error"
reportImportCycles = "error"
reportPropertyTypeMismatch = "error"
reportShadowedImports = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
[tool.mypy]
strict = true
packages = "re2-stubs"
[tool.pytest.ini_options]
xfail_strict = true
testpaths = [
"tests"
]