forked from pandas-dev/pandas-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
192 lines (173 loc) · 6.11 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
[tool.poetry]
name = "pandas-stubs"
version = "1.4.4.220912"
description = "Type annotations for pandas"
authors = ["The Pandas Development Team <[email protected]>"]
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",
"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"
"Source Code" = "https://github.com/pandas-dev/pandas-stubs"
[tool.poetry.dependencies]
python = ">=3.8,<3.11"
types-pytz = ">= 2022.1.1"
[tool.poetry.dev-dependencies]
mypy = ">=0.971"
pyarrow = ">=9.0.0"
pytest = ">=7.1.2"
pyright = ">=1.1.266"
poethepoet = "0.16.0"
loguru = ">=0.6.0"
pandas = "1.4.4"
typing-extensions = ">=4.2.0"
matplotlib = "~=3.5.0"
pre-commit = ">=2.19.0"
black = ">=22.8.0"
isort = ">=5.10.1"
openpyxl = ">=3.0.10"
tables = ">=3.7.0"
lxml = ">=4.7.1,<4.9.0"
pyreadstat = ">=1.1.9"
xlrd = ">=2.0.1"
pyxlsb = ">=1.0.9"
odfpy = ">=1.4.1"
xarray = ">=22.6.0"
tabulate = ">=0.8.10"
jinja2 = "^3.1"
scipy = ">=1.9.1"
SQLAlchemy = "^1.4.41"
[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"
script = "scripts.test.run:mypy_src"
[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
show_none_errors = true
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"]
# disable subset of strict
reportInconsistentConstructor = false
reportMissingParameterType = false
reportMissingTypeArgument = false
reportMissingTypeStubs = false
reportUnknownArgumentType = false
reportUnusedExpression = false
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
reportUntypedBaseClass = false
reportUnusedVariable = false
reportPrivateUsage = false
# enable optional checks
reportMissingModuleSource = true