diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c38354437e..2f1bae939aa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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)$ diff --git a/tests/test_black.py b/tests/test_black.py index 84061f10cdf..98d8ff886d7 100644 --- a/tests/test_black.py +++ b/tests/test_black.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.