Skip to content

Commit 7147769

Browse files
committed
Fix disable_errors typing
1 parent e2b7218 commit 7147769

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import difflib
1616
from textwrap import dedent
1717

18-
from typing import cast, List, Dict, Any, Sequence, Iterable, Tuple, Set, Optional, Union, ContextManager
18+
from typing import cast, List, Dict, Any, Sequence, Iterable, Tuple, Set, Optional, Union
1919
from typing_extensions import Final
2020

2121
from mypy.erasetype import erase_type
@@ -138,7 +138,7 @@ def add_errors(self, messages: 'MessageBuilder') -> None:
138138
self.errors.add_error_info(info)
139139

140140
@contextmanager
141-
def disable_errors(self) -> ContextManager[None]:
141+
def disable_errors(self) -> Iterable[None]:
142142
self.disable_count += 1
143143
try:
144144
yield

0 commit comments

Comments
 (0)