Merge pull request #6048 from bluetech/mypy-0.740
Update mypy 0.720 -> 0.740
This commit is contained in:
commit
3246d8a6e9
|
@ -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/)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue