Skip to content

Commit 5f9fee2

Browse files
authored
Bump mypy from 2.3.1 to 2.4.0 (#2548)
1 parent 217cf6c commit 5f9fee2

9 files changed

Lines changed: 269 additions & 200 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ See [0Ver](https://0ver.org/).
1010
### Features
1111

1212
- Add `python3.15` support
13+
- Add `mypy>=1.19,<2.5` support
1314

1415

1516
## 0.29.1 WIP

‎poetry.lock‎

Lines changed: 253 additions & 185 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ python = "^3.11"
5353
typing-extensions = ">=4.0,<5.0"
5454
pytest = {version = ">=8,<10", optional = true}
5555
hypothesis = {version = "^6.151", optional = true}
56-
mypy = {version = ">=1.19,<2.4", optional = true}
56+
mypy = {version = ">=1.19,<2.5", optional = true}
5757

5858
[tool.poetry.extras]
5959
compatible-mypy = ["mypy"]

‎typesafety/test_future/test_future_container/test_do.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
for x in Future.from_value(1)
99
)
1010
out: |
11-
main:3: error: Argument 1 to "do" of "Future" has incompatible type "Generator[Any, None, None]"; expected "AsyncGenerator[Never, None]" [arg-type]
11+
main:4: error: Argument 1 to "do" of "Future" has incompatible type "Generator[Any, None, None]"; expected "AsyncGenerator[Never, None]" [arg-type]
1212
main:5: error: "Future[int]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable) [attr-defined]
1313
main:5: note: Maybe you forgot to use "await"?
1414
@@ -30,8 +30,8 @@
3030
main: |
3131
from returns.future import Future
3232
33-
Future.do( # E: Using "if" conditions inside a generator is not allowed [misc]
34-
x + y
33+
Future.do(
34+
x + y # E: Using "if" conditions inside a generator is not allowed [misc]
3535
async for x in Future.from_value(1)
3636
async for y in Future.from_value(2.5)
3737
if y > 5

‎typesafety/test_future/test_future_result_container/test_do.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
for first in FutureSuccess(1)
99
)
1010
out: |
11-
main:3: error: Argument 1 to "do" of "FutureResult" has incompatible type "Generator[Any, None, None]"; expected "AsyncGenerator[Never, None]" [arg-type]
11+
main:4: error: Argument 1 to "do" of "FutureResult" has incompatible type "Generator[Any, None, None]"; expected "AsyncGenerator[Never, None]" [arg-type]
1212
main:5: error: "FutureResult[int, Any]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable) [attr-defined]
1313
main:5: note: Maybe you forgot to use "await"?
1414
@@ -84,8 +84,8 @@
8484
main: |
8585
from returns.future import FutureSuccess, FutureResult
8686
87-
FutureResult.do( # E: Using "if" conditions inside a generator is not allowed [misc]
88-
x + y
87+
FutureResult.do(
88+
x + y # E: Using "if" conditions inside a generator is not allowed [misc]
8989
async for x in FutureSuccess(1)
9090
async for y in FutureSuccess(2.5)
9191
if y > 5

‎typesafety/test_io/test_io_container/test_do.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
main: |
1717
from returns.io import IO
1818
19-
IO.do( # E: Using "if" conditions inside a generator is not allowed [misc]
20-
x + y
19+
IO.do(
20+
x + y # E: Using "if" conditions inside a generator is not allowed [misc]
2121
for x in IO(1)
2222
for y in IO(2.5)
2323
if y > 5

‎typesafety/test_io/test_ioresult_container/test_do.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
main: |
7171
from returns.io import IOSuccess, IOResult
7272
73-
IOResult.do( # E: Using "if" conditions inside a generator is not allowed [misc]
74-
x + y
73+
IOResult.do(
74+
x + y # E: Using "if" conditions inside a generator is not allowed [misc]
7575
for x in IOSuccess(1)
7676
for y in IOSuccess(2.5)
7777
if y > 5

‎typesafety/test_maybe/test_do.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
main: |
4545
from returns.maybe import Maybe
4646
47-
Maybe.do( # E: Using "if" conditions inside a generator is not allowed [misc]
48-
x + y
47+
Maybe.do(
48+
x + y # E: Using "if" conditions inside a generator is not allowed [misc]
4949
for x in Maybe.from_value(1)
5050
for y in Maybe.from_value(2.5)
5151
if y > 5

‎typesafety/test_result/test_do.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
main: |
5656
from returns.result import Success, Result
5757
58-
Result.do( # E: Using "if" conditions inside a generator is not allowed [misc]
59-
x + y
58+
Result.do(
59+
x + y # E: Using "if" conditions inside a generator is not allowed [misc]
6060
for x in Success(1)
6161
for y in Success(2.5)
6262
if y > 5

0 commit comments

Comments
 (0)