[pre-commit.ci] pre-commit autoupdate (#4547)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1) * Fix wrapper's return types to be String or Text IO --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Cooper Ry Lees <me@cooperlees.com>
This commit is contained in:
parent
e157ba4de5
commit
40b73f2fb5
@ -39,7 +39,7 @@ repos:
|
||||
exclude: ^src/blib2to3/
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.13.0
|
||||
rev: v1.14.1
|
||||
hooks:
|
||||
- id: mypy
|
||||
exclude: ^(docs/conf.py|scripts/generate_schema.py)$
|
||||
|
@ -1355,8 +1355,10 @@ def test_reformat_one_with_stdin_empty(self) -> None:
|
||||
|
||||
def _new_wrapper(
|
||||
output: io.StringIO, io_TextIOWrapper: type[io.TextIOWrapper]
|
||||
) -> Callable[[Any, Any], io.TextIOWrapper]:
|
||||
def get_output(*args: Any, **kwargs: Any) -> io.TextIOWrapper:
|
||||
) -> Callable[[Any, Any], Union[io.StringIO, io.TextIOWrapper]]:
|
||||
def get_output(
|
||||
*args: Any, **kwargs: Any
|
||||
) -> Union[io.StringIO, io.TextIOWrapper]:
|
||||
if args == (sys.stdout.buffer,):
|
||||
# It's `format_stdin_to_stdout()` calling `io.TextIOWrapper()`,
|
||||
# return our mock object.
|
||||
|
Loading…
Reference in New Issue
Block a user