Merge pull request #6048 from bluetech/mypy-0.740

Update mypy 0.720 -> 0.740
This commit is contained in:
Ran Benita 2019-10-23 12:47:21 +03:00 committed by GitHub
commit 3246d8a6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -42,7 +42,7 @@ repos:
hooks:
- id: rst-backticks
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.720
rev: v0.740
hooks:
- id: mypy
files: ^(src/|testing/)

View File

@ -187,7 +187,7 @@ class WarningsRecorder(warnings.catch_warnings):
exc_type: Optional["Type[BaseException]"],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType],
) -> bool:
) -> None:
if not self._entered:
__tracebackhide__ = True
raise RuntimeError("Cannot exit %r without entering first" % self)
@ -198,8 +198,6 @@ class WarningsRecorder(warnings.catch_warnings):
# manually here for this context manager to become reusable.
self._entered = False
return False
class WarningsChecker(WarningsRecorder):
def __init__(
@ -232,7 +230,7 @@ class WarningsChecker(WarningsRecorder):
exc_type: Optional["Type[BaseException]"],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType],
) -> bool:
) -> None:
super().__exit__(exc_type, exc_val, exc_tb)
__tracebackhide__ = True
@ -263,4 +261,3 @@ class WarningsChecker(WarningsRecorder):
[each.message for each in self],
)
)
return False