-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
140 lines (118 loc) · 3.13 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
[tool.black]
line-length = 79
target-version = ['py312']
skip-magic-trailing-comma = true
preview = true
enable-unstable-feature = [
'hug_parens_with_braces_and_square_brackets'
]
[tool.isort]
profile = "black"
use_parentheses = true
force_single_line = true
multi_line_output = 3
include_trailing_comma = true
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
lines_between_sections = 1
add_imports=[
"from __future__ import annotations",
]
[tool.coverage.run]
plugins = ["covdefaults"]
[tool.coverage.report]
show_missing = true
fail_under = 100
skip_covered = false
#exclude_lines = ["@pytest.mark.slow_integration"]
[tool.pytest.ini_options]
minversion = "6.0"
markers = []
xfail_strict = true
addopts = "-p lib.pytest.plugin.cap1fd -v --durations=0 --durations-min=10 --doctest-modules --last-failed"
testpaths = ["."]
norecursedirs = [
"**/__pycache__",
"**/.*",
"venv",
"tmp*",
"*tmp",
"**/bak",
"**/scratch",
]
python_files = ["*.py"]
python_classes = ["Test", "Describe"]
python_functions = ["test", "it"]
[tool.pyright]
include = ["."]
exclude = [
"**/__pycache__",
"**/.*",
"venv",
"tmp*",
"*tmp",
"**/bak",
"**/scratch",
]
follow_imports_for_stubs = true
pythonPlatform = "Linux"
pythonVersion = "3.12"
extraPaths = [
"venv/lib/python3.12/site-packages/"
]
typeCheckingMode = "strict"
# don't flag arguments as long as its type is known
reportMissingParameterType = "none"
reportUnknownParameterType = "error"
# turn on all the checks not already enabled by "strict":
reportCallInDefaultInitializer = "error"
reportImplicitStringConcatenation = "error"
reportMissingSuperCall = "error"
reportPropertyTypeMismatch = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportUnusedCallResult = "none" # too noisy
# maintainer has an strong anti-idomatic stance on what "constant" means
# https://github.com/microsoft/pyright/issues/5265
reportConstantRedefinition = false
[tool.mypy]
python_version = "3.12"
files = ["."]
exclude = [
"(^|/)venv/$",
"(^|/)bak/$",
"(^|/)scratch/$",
]
scripts_are_modules = true
# Strict mode; enables the following flags: (in mypy 1.7.1)
# --check-untyped-defs
# --disallow-any-generics
# --disallow-incomplete-defs
# --disallow-subclassing-any
# --disallow-untyped-calls
# --disallow-untyped-decorators
# --disallow-untyped-defs
# --extra-checks
# --no-implicit-reexport
# --strict-equality
# --warn-redundant-casts
# --warn-return-any
# --warn-unused-configs
# --warn-unused-ignores
strict = true
# disallow Any typing:
disallow_any_unimported = true
# better covered by pyright
# currently this flags attributes used in an `assert instance` typeguard..
disallow_any_expr = false
disallow_any_decorated = true
disallow_any_explicit = true
implicit_reexport = false
warn_no_return = true
warn_unreachable = true
# these are better-covered by pyright:
disallow_untyped_defs = false
disallow_untyped_calls = false
[tool.pylsp-mypy]
# NOTE: the pylsp server itself cannot be configured via pyproject.toml =.=
enabled = true
live_mode = true