-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
93 lines (83 loc) · 1.82 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
[tool.black]
target_version = ['py38', 'py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
skip-magic-trailing-comma = true
preview = true
force-exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| typeshed_client/typeshed
)/
'''
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
[tool.mypy]
strict_optional = true
warn_no_return = true
disallow_any_unimported = true
# Across versions of mypy, the flags toggled by --strict vary. To ensure
# we have reproducible type check, we instead manually specify the flags
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
# warn_return_any = true
warn_unreachable = true
implicit_reexport = false
strict_equality = true
# Disallow any
# disallow_any_explicit = true
disallow_any_decorated = true
exclude = [
"typeshed_client/typeshed",
"tests/site-packages",
"tests/typeshed",
"build/",
"thirdparty",
".tox/",
]
[tool.ruff]
line-length = 100
target-version = "py38"
preview = true
unsafe-fixes = true
exclude = [
"typeshed_client/typeshed",
"tests/typeshed",
"build/",
".tox/",
]
[tool.ruff.lint]
select = [
"F",
"E",
"I", # import sorting
"ANN", # enforce type annotations
"C4", # flake8-comprehensions
"B", # bugbear
"SIM", # simplify
"UP", # pyupgrade
"PIE",
"PERF",
"RUF", # Ruff's own rules
]
ignore = [
"ANN101", # missing type annotation for self in method
"ANN102", # missing type annotation for cls in classmethod
"SIM105", # I don't like contextlib.suppress
"UP038", # astral-sh/ruff#7871
]