forked from pandas-dev/pandas-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
201 lines (181 loc) · 6.57 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[tool.poetry]
name = "pandas-stubs"
version = "2.0.1.230501"
description = "Type annotations for pandas"
authors = ["The Pandas Development Team <pandas-dev@python.org>"]
license = "BSD-3-Clause"
readme = "README.md"
homepage = "https://pandas.pydata.org"
repository = "https://github.com/pandas-dev/pandas-stubs"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering"
]
packages = [
{ "include" = "pandas-stubs"}
]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/pandas-dev/pandas-stubs/issues"
"Documentation" = "https://pandas.pydata.org/pandas-docs/stable"
[tool.poetry.dependencies]
python = ">=3.8"
types-pytz = ">= 2022.1.1"
numpy = ">=1.24.3"
[tool.poetry.dev-dependencies]
mypy = "1.3.0"
pandas = "2.0.1"
pyarrow = ">=10.0.1"
pytest = ">=7.1.2"
pyright = "<= 1.1.308"
poethepoet = ">=0.16.5"
loguru = ">=0.6.0"
typing-extensions = ">=4.4.0"
matplotlib = ">=3.5.1"
pre-commit = ">=2.19.0"
black = ">=23.3.0"
isort = ">=5.12.0"
openpyxl = ">=3.0.10"
tables = { version = ">=3.7.0" , python = "<4"} # 3.8.0 depends on blosc2 which caps python to <4
lxml = ">=4.9.1"
pyreadstat = ">=1.2.0"
xlrd = ">=2.0.1"
xlsxwriter = ">=3.0.3"
pyxlsb = ">=1.0.10"
odfpy = ">=1.4.1"
xarray = ">=22.6.0"
tabulate = ">=0.8.10"
jinja2 = ">=3.1"
scipy = ">=1.9.1"
SQLAlchemy = ">=2.0.12"
types-python-dateutil = ">=2.8.19"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poe.tasks.test_all]
help = "Run all tests"
script = "scripts.test:test(src=True, dist=True)"
[tool.poe.tasks.test]
help = "Run local tests (includes 'mypy', 'pyright', 'pytest', and 'style')"
script = "scripts.test:test(src=True)"
[tool.poe.tasks.test_dist]
help = "Run tests on the installed stubs (includes 'mypy_dist' and 'pyright_dist')"
script = "scripts.test:test(dist=True)"
[tool.poe.tasks.pytest]
help = "Run pytest"
script = "scripts.test:pytest(nightly)"
args = [{name = "nightly", positional = false, default = false, type = "boolean", required = false, help= "Use pandas nightly (off by default)"}]
[tool.poe.tasks.style]
help = "Run pre-commit"
script = "scripts.test.run:style"
[tool.poe.tasks.mypy]
help = "Run mypy on 'tests' (using the local stubs) and on the local stubs"
args = [{name = "mypy_nightly", positional = false, default = false, type = "boolean", required = false, help= "Use mypy nightly (off by default)"}]
script = "scripts.test:mypy_src(mypy_nightly)"
[tool.poe.tasks.mypy_dist]
help = "Run mypy on 'tests' using the installed stubs"
script = "scripts.test:test(dist=True, type_checker='mypy')"
[tool.poe.tasks.pyright]
help = "Run pyright on 'tests' (using the local stubs) and on the local stubs"
script = "scripts.test.run:pyright_src"
[tool.poe.tasks.pyright_dist]
help = "Run pyright on 'tests' using the installed stubs"
script = "scripts.test:test(dist=True, type_checker='pyright')"
[tool.poe.tasks.stubtest]
script = "scripts.test:stubtest(allowlist, check_missing, nightly)"
help = "Run stubtest to compare the installed stubs against pandas"
args = [{ name = "allowlist", positional = true, default = "", required = false, help= "Path to an allowlist (optional)" }, {name = "check_missing", positional = false, default = false, type = "boolean", required = false, help= "Report errors when the stubs are incomplete (off by default)"}, {name = "nightly", positional = false, default = false, type = "boolean", required = false, help= "Compare against pandas nightly (off by default)"}]
[tool.black]
target-version = ['py38']
[tool.isort]
known_pre_libs = "pandas._config"
known_pre_core = ["pandas._libs", "pandas._typing", "pandas.util._*", "pandas.compat", "pandas.errors"]
known_dtypes = "pandas.core.dtypes"
known_post_core = ["pandas.tseries", "pandas.io", "pandas.plotting"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY" ,"PRE_LIBS" , "PRE_CORE", "DTYPES", "FIRSTPARTY", "POST_CORE", "LOCALFOLDER"]
profile = "black"
combine_as_imports = true
force_grid_wrap = 2
force_sort_within_sections = true
skip_glob = "env"
[tool.mypy]
# Import discovery
namespace_packages = false
explicit_package_bases = false
ignore_missing_imports = true
follow_imports = "normal"
follow_imports_for_stubs = false
no_site_packages = false
no_silence_site_packages = false
# Platform configuration
python_version = "3.8"
# Disallow dynamic typing
disallow_any_unimported = false # TODO
disallow_any_expr = false # TODO
disallow_any_decorated = false # TODO
disallow_any_explicit = false # TODO
disallow_any_generics = false # TODO
disallow_subclassing_any = false # TODO
# Untyped definitions and calls
disallow_untyped_calls = false # TODO
disallow_untyped_defs = false # TODO
disallow_incomplete_defs = false # TODO
check_untyped_defs = true
disallow_untyped_decorators = true
# None and Optional handling
no_implicit_optional = true
strict_optional = true
# Configuring warnings
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = false # TODO
warn_unreachable = false # GH#27396
# Suppressing errors
ignore_errors = false
enable_error_code = "ignore-without-code" # same as in pandas
# Miscellaneous strictness flags
allow_untyped_globals = false
allow_redefinition = false
local_partial_types = false
implicit_reexport = false # pyright behaves the same
strict_equality = true
# Configuring error messages
show_error_context = false
show_column_numbers = false
show_error_codes = true
[tool.pyright]
typeCheckingMode = "strict"
stubPath = "."
include = ["tests", "pandas-stubs"]
enableTypeIgnoreComments = false # use pyright-specific ignores
# disable subset of strict
reportInconsistentConstructor = false
reportMissingParameterType = false
reportMissingTypeArgument = false
reportMissingTypeStubs = false
reportUnnecessaryTypeIgnoreComment = true
reportUnknownArgumentType = false
reportUnusedExpression = false
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
reportUntypedBaseClass = false
reportUnusedVariable = false
reportPrivateUsage = false
# enable optional checks
reportMissingModuleSource = true
useLibraryCodeForTypes = false
[tool.codespell]
ignore-words-list = "indext, mose, sav, ser"