Skip to content

Commit 8895d18

Browse files
committed
don't use bool in typing-full.pyi
1 parent 172c4f5 commit 8895d18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test-data/unit/check-default-plugin.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ from typing import Callable, Iterator
3030
c: Callable[..., Iterator[int]]
3131
reveal_type(c) # E: Revealed type is 'def (*Any, **Any) -> typing.Iterator[builtins.int]'
3232
reveal_type(contextmanager(c)) # E: Revealed type is 'def (*Any, **Any) -> contextlib.GeneratorContextManager[builtins.int*]'
33-
[builtins fixtures/async_await.pyi]
3433
[typing fixtures/typing-full.pyi]

test-data/unit/fixtures/typing-full.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def runtime(cls: T) -> T:
140140

141141
class ContextManager(Generic[T]):
142142
def __enter__(self) -> T: pass
143-
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> Optional[bool]: pass
143+
# Use Any because not all the precise types are in the fixtures.
144+
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> Any: pass
144145

145146
TYPE_CHECKING = 1

0 commit comments

Comments
 (0)