-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
124 lines (115 loc) · 2.16 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
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
[tool.black]
line-length = 120
target-version = [
"py312",
]
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| node_modules
setup.py
)/
'''
[tool.ruff]
target-version = "py312"
# Same as Black.
line-length = 120
indent-width = 4
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"benchmark",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"tests",
"venv",
]
# Like Black, indent with spaces, rather than tabs.
format.indent-style = "space"
# Like Black, use double quotes for strings.
format.quote-style = "double"
# Like Black, automatically detect the appropriate line ending.
format.line-ending = "auto"
# Like Black, respect magic trailing commas.
format.skip-magic-trailing-comma = false
lint.select = [
"ALL",
]
lint.ignore = [
"ANN001",
"ANN201",
"ANN202",
"BLE001",
"C901",
"D100",
"D101",
"D103",
"D104",
"D203",
"D212",
"EM101",
"EM102",
"FBT003",
"G004",
"N812",
"PD901",
"PLR2004",
"T201",
"TRY003",
]
lint.explicit-preview-rules = true
# Allow fix for all enabled rules (when `--fix`) is provided.
lint.fixable = [
"ALL",
]
lint.unfixable = [
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-) )
disallow_untyped_defs = true