|
1 | 1 | [project] |
2 | 2 | name = "parallel-web" |
3 | | -version = "0.2.0" |
| 3 | +version = "0.2.1" |
4 | 4 | description = "The official Python library for the Parallel API" |
5 | 5 | dynamic = ["readme"] |
6 | 6 | license = "MIT" |
@@ -56,7 +56,6 @@ dev-dependencies = [ |
56 | 56 | "dirty-equals>=0.6.0", |
57 | 57 | "importlib-metadata>=6.7.0", |
58 | 58 | "rich>=13.7.1", |
59 | | - "nest_asyncio==1.6.0", |
60 | 59 | "pytest-xdist>=3.6.1", |
61 | 60 | "griffe>=1", |
62 | 61 | ] |
@@ -158,6 +157,58 @@ reportOverlappingOverload = false |
158 | 157 | reportImportCycles = false |
159 | 158 | reportPrivateUsage = false |
160 | 159 |
|
| 160 | +[tool.mypy] |
| 161 | +pretty = true |
| 162 | +show_error_codes = true |
| 163 | + |
| 164 | +# Exclude _files.py because mypy isn't smart enough to apply |
| 165 | +# the correct type narrowing and as this is an internal module |
| 166 | +# it's fine to just use Pyright. |
| 167 | +# |
| 168 | +# We also exclude our `tests` as mypy doesn't always infer |
| 169 | +# types correctly and Pyright will still catch any type errors. |
| 170 | +exclude = ['src/parallel/_files.py', '_dev/.*.py', 'tests/.*'] |
| 171 | + |
| 172 | +strict_equality = true |
| 173 | +implicit_reexport = true |
| 174 | +check_untyped_defs = true |
| 175 | +no_implicit_optional = true |
| 176 | + |
| 177 | +warn_return_any = true |
| 178 | +warn_unreachable = true |
| 179 | +warn_unused_configs = true |
| 180 | + |
| 181 | +# Turn these options off as it could cause conflicts |
| 182 | +# with the Pyright options. |
| 183 | +warn_unused_ignores = false |
| 184 | +warn_redundant_casts = false |
| 185 | + |
| 186 | +disallow_any_generics = true |
| 187 | +disallow_untyped_defs = true |
| 188 | +disallow_untyped_calls = true |
| 189 | +disallow_subclassing_any = true |
| 190 | +disallow_incomplete_defs = true |
| 191 | +disallow_untyped_decorators = true |
| 192 | +cache_fine_grained = true |
| 193 | + |
| 194 | +# By default, mypy reports an error if you assign a value to the result |
| 195 | +# of a function call that doesn't return anything. We do this in our test |
| 196 | +# cases: |
| 197 | +# ``` |
| 198 | +# result = ... |
| 199 | +# assert result is None |
| 200 | +# ``` |
| 201 | +# Changing this codegen to make mypy happy would increase complexity |
| 202 | +# and would not be worth it. |
| 203 | +disable_error_code = "func-returns-value,overload-cannot-match" |
| 204 | + |
| 205 | +# https://github.com/python/mypy/issues/12162 |
| 206 | +[[tool.mypy.overrides]] |
| 207 | +module = "black.files.*" |
| 208 | +ignore_errors = true |
| 209 | +ignore_missing_imports = true |
| 210 | + |
| 211 | + |
161 | 212 | [tool.ruff] |
162 | 213 | line-length = 120 |
163 | 214 | output-format = "grouped" |
|
0 commit comments