-
Notifications
You must be signed in to change notification settings - Fork 36
/
pyproject.toml
107 lines (99 loc) · 3 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 115
target-version = ["py311"]
exclude = 'generated'
preview = "True"
[tool.mypy]
python_version = "3.11"
show_error_codes = true
# follow_imports = "silent"
ignore_missing_imports = true
color_output = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = false # @pytest.mark.asyncio is untyped
disallow_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_unreachable = true
pretty = true
show_absolute_path = true
show_error_context = true
disallow_untyped_calls = false
exclude = ["tests/", "build/"]
[tool.pytest.ini_options]
testpaths = ["tests"]
norecursedirs = [".git", "testing_config"]
asyncio_mode = "auto"
[tool.ruff]
target-version = "py311"
unfixable = [
"F841" # Unused variables
]
exclude = ["examples", "tests", "pylint", "build"]
select = [
"B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception
"B006", # Do not use mutable data structures for argument defaults
"C", # complexity
"D", # docstrings
"E", # pycodestyle
"F", # pyflakes/autoflake
"I", # isort
"PL", # pylint
"RUF", # ruff-specific
"FA", # flake-8 future annotations
"TID", # flake-8 tidy imports
"SLF", # flake-8 self
"SIM", # flake-8 simplify
"ICN001", # import concentions; {name} should be imported as {asname}
"PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package.
"RET", # flake-8 return
"S", # Bandit
"T20", # flake8-print
"TRY", # tryceratops
"UP", # pyupgrade
"W" # pycodestyle
]
ignore = [
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D404", # First word of the docstring should not be This
"D406", # Section name should end with a newline
"D407", # Section name underlining
"D411", # Missing blank line before section
"E501", # line too long
"E731", # do not assign a lambda expression, use a def
"TRY003", # Avoid messages outside of the Exception class
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"PLR0913", # Too many arguments in a function call
"PLR2004", # Magic values. Often triggered by aiohttp response status check.
"PLR0911", # Too many return statements
"TRY301", # Avoid raising withing a try block
"UP006", # Along with UP007, make up pyupgrade's keep-runtime-typing
"UP007"
]
[tool.ruff.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.mccabe]
max-complexity = 25
[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]
[tool.tomlsort]
all = false
check = false
ignore_case = true
in_place = true
no_header = false