Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
260 lines (254 loc) · 6.72 KB
/
Copy pathpyproject.toml
File metadata and controls
260 lines (254 loc) · 6.72 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
[project]
name = "sync-engine"
version = "0.1.0"
description = "Close's email sync engine."
requires-python = "==3.12.*"
dependencies = [
"alembic==1.7.5",
"arrow==0.17.0",
"attrs==23.1.0",
"authalligator-client @ https://github.com/closeio/authalligator-client/archive/e7cc8e0bc5b1f2285ab5997e2590a8eb056fc627.zip",
"boto3==1.35.50",
"botocore==1.35.50",
"ciso8601==2.2.0",
"click==8.1.7",
"cryptography==50.0.0",
"dnspython==2.6.1",
"flanker @ https://github.com/closeio/flanker-new/archive/fa272d95345d45e8bb1f9bc32bc2c074bf52a484.zip",
"Flask==3.1.3",
"Flask-RESTful==0.3.9",
"gdata==2.0.18",
"gunicorn==23.0.0",
"hiredis==2.3.2",
"html2text==2020.1.16",
"icalendar==4.0.9",
"imapclient==2.2.0",
"ipython==9.12.0",
"json_log_formatter==1.0",
"limitlion==1.1.0",
"lxml==6.1.0",
"more-itertools==10.5.0",
"mysqlclient==2.2.5",
"Pympler==0.9",
"PyNaCl==1.6.2",
"python-dateutil==2.8.2",
"python-json-logger==3.3.0",
"pytz==2026.1.post1",
"PyYAML==6.0.2",
"redis==5.0.2",
"requests==2.34.2",
"sentry-sdk<3",
"setproctitle==1.3.7",
"sqlalchemy==1.4.54",
"statsd==3.3.0",
"tldextract==3.1.2",
"structlog==23.1.0",
"typing_extensions",
"urllib3==2.8.0",
"vobject==0.9.6.1",
"Werkzeug==3.1.8",
"zstandard==0.23.0",
]
[dependency-groups]
lint = [
"mypy==1.13.0",
"ruff==0.8.2",
"types-python-dateutil==2.9.0.20260807",
"types-pytz==2026.3.1.20260727",
"types-PyYAML==6.0.12.20260815",
"types-redis==4.6.0.20241004",
]
test = [
"coverage==7.16.1",
"freezegun==1.5.1",
"hypothesis==6.168.0",
"iniconfig==2.0.0",
"mockredispy==2.9.3",
"packaging==26.3",
"pluggy==1.6.0",
"pyparsing==3.1.4",
"pytest==9.1.1",
"pytest-cov==5.0.0",
"pytest-timeout==2.4.0",
"responses==0.25.3",
"sortedcontainers==2.4.0",
]
dev = [{include-group = "lint"}, {include-group = "test"}]
[tool.uv]
required-version = ">=0.13.5"
# This is a service, not a library to be installed/imported by others.
package = false
[tool.ruff]
target-version = "py312"
line-length = 79
preview = true
force-exclude = true
[tool.ruff.lint]
explicit-preview-rules = true
ignore = [
# Missing docstrings
"D1",
# One-line docstring should fit on one line with quotes.
# We ignore this because it's OK to buy yourself a few extra characters
# for the summary line even if the summary line is *the only* line.
"D200",
# 1 blank line required between summary line and description. We ignore
# this because we have quite a few docstrings where the summary is
# multi-line.
"D205",
# Multi-line docstring summary should start at the first line.
# We ignore this because we agreed in #20553 that we we want to put the
# summary line below """ for multi-line docstrings.
"D212",
# First line should end with a period. We ignore this because we have
# multi-line summaries.
"D400",
# First line should end with a period, question mark, or exclamation point.
# We ignore this because we have multi-line summaries.
"D415",
"E501",
"E741",
# Exceptions named with Error
"N818",
# Return `bool(x)` instead of `if x: return True else return False`
# This can result in awkward style inconsistency in functions with
# multiple `if ...: return True/False` statements.
"SIM103",
# Use `x in dict` instead of `x in dict.keys()`
# we like explicit .keys()
"SIM118",
# Ternary instead of assignment in if-else
# Long ternary lines can be really ugly with black
"SIM108",
# Magic values, too draconian rule
"PLR2004",
# Too many branches
"PLR0912",
# Too many arguments to function call
"PLR0913",
# Too many statements
"PLR0915",
# Too many returns
"PLR0911",
# Consider using `elif` instead of `else` then `if` to remove one indentation level
# This is an explicit style choice
"PLR5501",
# `x == ""` can be simplified to `not x` as an empty string is falsey
# This is an unsafe transformation, if x is None then the result is different
"PLC1901",
"B905",
"B026",
# No explicit `stacklevel` keyword argument found for warnings
"B028",
"G004",
"PIE796",
# Outer for loop variable `query` overwritten by inner assignment target
"PLW2901",
# Using the global statement to update `x` is discouraged
"PLW0603",
# Redefining argument with the local name
"PLR1704",
# Fixture `x` without value is injected as parameter, use `@pytest.mark.usefixtures` instead
"PT019",
# `pytest.raises(ValueError)` is too broad
# ValueError is too specific to report on
"PT011",
# Splitext is used in S3 code
"PTH122",
# Enforce f-strings instead of .format
# We want to allow .format calls too.
"UP032",
# Not ready for __future__ annotations
"UP037",
# D203 and D211 are incompatible. Ignoring D203
"D203",
# `import` should be at the top-level of a file
"PLC0415",
]
select = [
"A001",
"ASYNC",
"B",
"D",
"E",
"F",
"N",
"SIM",
"S110", # Exceptions must be logged in try-except-pass
"S112", # Exceptions must be logged in try-except-continue
"TID25",
"TC005",
"W",
"UP",
"ISC",
"ICN",
"G",
"PIE",
"PTH",
"PT",
"PL",
"I",
"INP",
# noqa management
"PGH004",
# Static key in dict comprehension
"RUF100",
# f-string conversion flags
"RUF010",
# Quadratic list summation
"RUF017",
# prints and pdb import
"T",
# Unnecessarily verbose raise
"TRY201",
# Useless try-except-raise
"TRY203",
# Annotations
"ANN201",
"ANN204",
"ANN205",
"ANN206",
# Executable files vs shebangs
"EXE",
# Explicit `None` returns
"RET501",
"RET502",
"RET503",
"S608",
]
unfixable = [
# Variable assigned but never used - automatically removing the assignment
# is annoying when running autofix on work-in-progress code.
"F841",
]
[tool.ruff.lint.per-file-ignores]
"bin/**.py" = ["T201", "E402", "N999"]
"migrations/**.py" = ["T201", "E402"]
"tests/**.py" = ["ANN"]
[tool.mypy]
python_version = "3.12"
strict_equality = true
warn_unreachable = true
warn_unused_ignores = true
warn_redundant_casts = true
show_error_context = true
enable_error_code = [
"unused-awaitable",
"redundant-self",
"redundant-expr",
"possibly-undefined",
"ignore-without-code",
"truthy-iterable",
"truthy-bool",
]
pretty = true
files = [
"bin",
"inbox",
"migrations",
]
namespace_packages = true
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_defs = true
disallow_incomplete_defs = true