Skip to content

Commit a8225a2

Browse files
committed
convince mypy that these are the same
1 parent 9516ed4 commit a8225a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pre_commit/error_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77
import traceback
88
from typing import Generator
9+
from typing import IO
910

1011
import pre_commit.constants as C
1112
from pre_commit import output
@@ -32,7 +33,7 @@ def _log_and_exit(
3233
with contextlib.ExitStack() as ctx:
3334
if os.access(storedir, os.W_OK):
3435
output.write_line(f'Check the log at {log_path}')
35-
log = ctx.enter_context(open(log_path, 'wb'))
36+
log: IO[bytes] = ctx.enter_context(open(log_path, 'wb'))
3637
else: # pragma: win32 no cover
3738
output.write_line(f'Failed to write to log at {log_path}')
3839
log = sys.stdout.buffer

0 commit comments

Comments
 (0)