-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
90 lines (77 loc) · 2.09 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
[project]
name = "python-stubs"
version = "0.0.0"
requires-python = ">=3.8"
[tool.ruff]
line-length = 130
fix = true
src = ["stubs"]
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint]
extend-select = [
"PYI", # flake8-pyi
"PGH004", # flake8-noqa
"I", # isort
"UP", # pyupgrade
"RUF100", # yesqa
"FA", # flake8-future-annotations
"TID", # flake8-tidy-imports
]
fixable = [
"F401", # Remove unused imports
"UP",
"PYI",
"I",
"RUF100",
"FA",
"TID",
]
[tool.ruff.lint.extend-per-file-ignores]
"*.pyi" = [
"E741", # ambiguous-variable-name
"F403", # undefined-local-with-import-star
"F405", # undefined-local-with-import-star-usage
]
"__init__.pyi" = ["TID252"]
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false
extra-standard-library = ["typing_extensions", "_typeshed"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.mypy]
mypy_path = "stubs/"
strict = true
warn_unused_ignores = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
[tool.pyright]
# Project settings
stubPath = "stubs/"
enableTypeIgnoreComments = false # Leave "type: ignore" comments to mypy
ignore = [
"**/site-packages/", # Disable annoying checks in third-party library code
]
# Strict mode
typeCheckingMode = "strict"
reportCallInDefaultInitializer = "error"
reportUnnecessaryTypeIgnoreComment = "error"
# Disable extra strict settings
reportIncompleteStub = "none"
reportMissingParameterType = "none"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnknownVariableType = "none"
# Not relevant for stubs
reportMissingModuleSource = "none"
reportMissingTypeStubs = "none"
reportPrivateUsage = "none"
reportOverlappingOverload = "none" # Overlapping overloads are often necessary in stubs
# Out of control of the stubs (inherited from implementation)
reportIncompatibleMethodOverride = "none"
reportIncompatibleVariableOverride = "none"
reportPropertyTypeMismatch = "none"
reportSelfClsParameterName = "none"
[tool.pytest.ini_options]
testpaths = ["tests"]