Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#4547)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](pre-commit/mirrors-mypy@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 <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and cooperlees authored Jan 7, 2025
1 parent e157ba4 commit 40b73f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)$
Expand Down
6 changes: 4 additions & 2 deletions tests/test_black.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 40b73f2

Please sign in to comment.