Skip to content

Commit 2939161

Browse files
JuliaBarssobolevn
andauthored
Bump mypy from 1.10.1 to 1.11.0 (#1887)
Co-authored-by: sobolevn <[email protected]>
1 parent aa7829c commit 2939161

34 files changed

+305
-300
lines changed

poetry.lock

Lines changed: 233 additions & 228 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
@@ -49,9 +49,9 @@ _ = "returns.contrib.hypothesis._entrypoint"
4949
python = "^3.9"
5050

5151
typing-extensions = ">=4.0,<5.0"
52-
mypy = { version = ">=1.10,<1.11", optional = true }
5352
pytest = { version = "^8.0", optional = true }
5453
hypothesis = { version = "^6.98", optional = true }
54+
mypy = {version = ">=1.11,<1.12", optional = true}
5555

5656
[tool.poetry.group.dev.dependencies]
5757
anyio = "^4.3"

typesafety/test_converters/test_flatten.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
5858
flatten(returns_result())
5959
out: |
60-
main:7: error: Argument 1 to "flatten" has incompatible type "Result[int, Result[int, str]]"; expected "KindN[Result[Any, Any], KindN[Result[Any, Any], Never, Result[int, str], NoReturn], Result[int, str], NoReturn]" [arg-type]
60+
main:7: error: Argument 1 to "flatten" has incompatible type "Result[int, Result[int, str]]"; expected "KindN[Result[Any, Any], KindN[Result[Any, Any], Never, Result[int, str], Never], Result[int, str], Never]" [arg-type]
6161
6262
6363
- case: flatten_io

typesafety/test_interfaces/test_altable/test_inheritance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
) -> 'MyClass[N, E]':
9393
...
9494
out: |
95-
main:10: error: Return type "MyClass[N, E]" of "alt" incompatible with return type "KindN[MyClass[V, E], V, _UpdatedType, NoReturn]" in supertype "AltableN" [override]
95+
main:10: error: Return type "MyClass[N, E]" of "alt" incompatible with return type "KindN[MyClass[V, E], V, _UpdatedType, Never]" in supertype "AltableN" [override]
9696
main:12: error: Argument 1 of "alt" is incompatible with supertype "AltableN"; supertype defines the argument type as "Callable[[E], _UpdatedType]" [override]
9797
main:12: note: This violates the Liskov substitution principle
9898
main:12: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

typesafety/test_interfaces/test_applicative/test_inheritance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@
104104
def from_value(cls, inner_value: V) -> None:
105105
...
106106
out: |
107-
main:11: error: Argument 1 of "apply" is incompatible with supertype "ApplicativeN"; supertype defines the argument type as "KindN[MyClass[V], Callable[[V], _UpdatedType], NoReturn, NoReturn]" [override]
107+
main:11: error: Argument 1 of "apply" is incompatible with supertype "ApplicativeN"; supertype defines the argument type as "KindN[MyClass[V], Callable[[V], _UpdatedType], Never, Never]" [override]
108108
main:11: note: This violates the Liskov substitution principle
109109
main:11: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
110-
main:16: error: Return type "None" of "from_value" incompatible with return type "KindN[MyClass[V], _UpdatedType, NoReturn, NoReturn]" in supertype "ApplicativeN" [override]
110+
main:16: error: Return type "None" of "from_value" incompatible with return type "KindN[MyClass[V], _UpdatedType, Never, Never]" in supertype "ApplicativeN" [override]
111111
main:16: error: Argument 1 of "from_value" is incompatible with supertype "ApplicativeN"; supertype defines the argument type as "_UpdatedType" [override]
112112
main:16: note: This violates the Liskov substitution principle
113113
main:16: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

typesafety/test_interfaces/test_bindable/test_inheritance.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@
116116
) -> 'MyClass[V]':
117117
...
118118
out: |
119-
main:9: error: Return type "MyClass[V]" of "bind" incompatible with return type "KindN[MyClass[V], _UpdatedType, NoReturn, NoReturn]" in supertype "BindableN" [override]
120-
main:11: error: Argument 1 of "bind" is incompatible with supertype "BindableN"; supertype defines the argument type as "Callable[[V], KindN[MyClass[V], _UpdatedType, NoReturn, NoReturn]]" [override]
119+
main:9: error: Return type "MyClass[V]" of "bind" incompatible with return type "KindN[MyClass[V], _UpdatedType, Never, Never]" in supertype "BindableN" [override]
120+
main:11: error: Argument 1 of "bind" is incompatible with supertype "BindableN"; supertype defines the argument type as "Callable[[V], KindN[MyClass[V], _UpdatedType, Never, Never]]" [override]
121121
main:11: note: This violates the Liskov substitution principle
122122
main:11: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
123123
@@ -140,8 +140,8 @@
140140
) -> 'MyClass[V, T]':
141141
...
142142
out: |
143-
main:10: error: Return type "MyClass[V, T]" of "bind" incompatible with return type "KindN[MyClass[V, T], _UpdatedType, T, NoReturn]" in supertype "BindableN" [override]
144-
main:12: error: Argument 1 of "bind" is incompatible with supertype "BindableN"; supertype defines the argument type as "Callable[[V], KindN[MyClass[V, T], _UpdatedType, T, NoReturn]]" [override]
143+
main:10: error: Return type "MyClass[V, T]" of "bind" incompatible with return type "KindN[MyClass[V, T], _UpdatedType, T, Never]" in supertype "BindableN" [override]
144+
main:12: error: Argument 1 of "bind" is incompatible with supertype "BindableN"; supertype defines the argument type as "Callable[[V], KindN[MyClass[V, T], _UpdatedType, T, Never]]" [override]
145145
main:12: note: This violates the Liskov substitution principle
146146
main:12: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
147147

typesafety/test_interfaces/test_failable/test_diverse_failable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
) -> MyClass[_FirstType, _FirstType]:
9393
...
9494
out: |
95-
main:13: error: Return type "MyClass[_FirstType, _FirstType]" of "from_failure" incompatible with return type "KindN[MyClass[_FirstType, _SecondType], _FirstType, _UpdatedType, NoReturn]" in supertype "DiverseFailableN" [override]
95+
main:13: error: Return type "MyClass[_FirstType, _FirstType]" of "from_failure" incompatible with return type "KindN[MyClass[_FirstType, _SecondType], _FirstType, _UpdatedType, Never]" in supertype "DiverseFailableN" [override]
9696
main:15: error: Argument 1 of "from_failure" is incompatible with supertype "DiverseFailableN"; supertype defines the argument type as "_UpdatedType" [override]
9797
main:15: note: This violates the Liskov substitution principle
9898
main:15: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

typesafety/test_interfaces/test_lashable/test_inheritance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@
9292
) -> MyClass[N, E]:
9393
...
9494
out: |
95-
main:10: error: Return type "MyClass[N, E]" of "lash" incompatible with return type "KindN[MyClass[V, E], V, _UpdatedType, NoReturn]" in supertype "LashableN" [override]
96-
main:12: error: Argument 1 of "lash" is incompatible with supertype "LashableN"; supertype defines the argument type as "Callable[[E], KindN[MyClass[V, E], V, _UpdatedType, NoReturn]]" [override]
95+
main:10: error: Return type "MyClass[N, E]" of "lash" incompatible with return type "KindN[MyClass[V, E], V, _UpdatedType, Never]" in supertype "LashableN" [override]
96+
main:12: error: Argument 1 of "lash" is incompatible with supertype "LashableN"; supertype defines the argument type as "Callable[[E], KindN[MyClass[V, E], V, _UpdatedType, Never]]" [override]
9797
main:12: note: This violates the Liskov substitution principle
9898
main:12: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
9999

typesafety/test_interfaces/test_mappable/test_inheritance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
def map(self, function: Callable[[V], int]) -> 'MyClass[V]':
9696
...
9797
out: |
98-
main:9: error: Return type "MyClass[V]" of "map" incompatible with return type "KindN[MyClass[V], _UpdatedType, NoReturn, NoReturn]" in supertype "MappableN" [override]
98+
main:9: error: Return type "MyClass[V]" of "map" incompatible with return type "KindN[MyClass[V], _UpdatedType, Never, Never]" in supertype "MappableN" [override]
9999
main:9: error: Argument 1 of "map" is incompatible with supertype "MappableN"; supertype defines the argument type as "Callable[[V], _UpdatedType]" [override]
100100
main:9: note: This violates the Liskov substitution principle
101101
main:9: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
@@ -116,7 +116,7 @@
116116
def map(self, function: Callable[[E], N]) -> 'MyClass[E, N]':
117117
...
118118
out: |
119-
main:10: error: Return type "MyClass[E, N]" of "map" incompatible with return type "KindN[MyClass[V, E], _UpdatedType, E, NoReturn]" in supertype "MappableN" [override]
119+
main:10: error: Return type "MyClass[E, N]" of "map" incompatible with return type "KindN[MyClass[V, E], _UpdatedType, E, Never]" in supertype "MappableN" [override]
120120
main:10: error: Argument 1 of "map" is incompatible with supertype "MappableN"; supertype defines the argument type as "Callable[[V], _UpdatedType]" [override]
121121
main:10: note: This violates the Liskov substitution principle
122122
main:10: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

typesafety/test_interfaces/test_specific/test_future/test_futurebased_inheritance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@
158158
async def awaitable(self) -> None:
159159
...
160160
out: |
161-
main:12: error: Return type "Generator[None, None, T]" of "__await__" incompatible with return type "Generator[Any, Any, IOLikeN[T, NoReturn, NoReturn]]" in supertype "AwaitableFutureN" [override]
162-
main:15: error: Return type "Coroutine[Any, Any, None]" of "awaitable" incompatible with return type "Coroutine[Any, Any, IOLikeN[T, NoReturn, NoReturn]]" in supertype "AwaitableFutureN" [override]
161+
main:12: error: Return type "Generator[None, None, T]" of "__await__" incompatible with return type "Generator[Any, Any, IOLikeN[T, Never, Never]]" in supertype "AwaitableFutureN" [override]
162+
main:15: error: Return type "Coroutine[Any, Any, None]" of "awaitable" incompatible with return type "Coroutine[Any, Any, IOLikeN[T, Never, Never]]" in supertype "AwaitableFutureN" [override]

0 commit comments

Comments
 (0)