Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9516ed4 commit a8225a2Copy full SHA for a8225a2
1 file changed
pre_commit/error_handler.py
@@ -6,6 +6,7 @@
6
import sys
7
import traceback
8
from typing import Generator
9
+from typing import IO
10
11
import pre_commit.constants as C
12
from pre_commit import output
@@ -32,7 +33,7 @@ def _log_and_exit(
32
33
with contextlib.ExitStack() as ctx:
34
if os.access(storedir, os.W_OK):
35
output.write_line(f'Check the log at {log_path}')
- log = ctx.enter_context(open(log_path, 'wb'))
36
+ log: IO[bytes] = ctx.enter_context(open(log_path, 'wb'))
37
else: # pragma: win32 no cover
38
output.write_line(f'Failed to write to log at {log_path}')
39
log = sys.stdout.buffer
0 commit comments