-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (125 loc) · 3.33 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (125 loc) · 3.33 KB
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
141
142
143
[project]
name = "python-stubs"
version = "0.0.0"
requires-python = ">=3.12"
[dependency-groups]
tests = [
# geopandas and shapely
"types-geopandas>=1.0.1",
"types-shapely>=2.0.0",
"pandas-stubs>=2.2.2",
"pyarrow-stubs>=20.0.0",
"matplotlib>=3.8.0",
"folium>=0.16.0",
"rtree>=1.2.0",
# netfields and psqlextra
"django-types>=0.19.1",
"djangorestframework-types>=0.8.0",
"types-psycopg2>=2.9.21",
"types-netaddr>=1.2.0",
"types-python-dateutil>=2.9.0",
# pandapower
"networkx>=3.2.1",
"geopandas>=1.0.0",
"pandapower>=3.1.2",
"types-networkx>=3.4.2",
]
dev = [
"ruff>=0.15.15",
"pytest>=9.0",
"rich-argparse>=1.8.0",
"mypy[native-parser]>=2.1.0",
"pyright>=1.1.409",
"ty>=0.0.40",
"pyrefly>=1.0.0",
{ include-group = "tests" },
]
[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
"UP042", # replace-str-enum
]
"__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
enable_error_code = "deprecated"
allow_redefinition = true
native_parser = true
[tool.pyright]
# Project settings
stubPath = "stubs/"
enableTypeIgnoreComments = false # Leave "type: ignore" comments to mypy
# 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.ty]
analysis.respect-type-ignore-comments = false
terminal.output-format = "concise"
[tool.ty.rules]
deprecated = "error"
invalid-method-override = "ignore" # out of control of the stubs (inherited from implementation)
[tool.pyrefly]
search-path = ["stubs/"]
enabled-ignores = ["pyrefly"]
output-format = "min-text"
[tool.pyrefly.errors]
deprecated = "error"
# Out of control of the stubs (inherited from implementation)
bad-override = false
inconsistent-inheritance = false
[tool.pytest.ini_options]
testpaths = ["tests"]