mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
mypy passes with check_untyped_defs
This commit is contained in:
parent
ab19b94811
commit
fa536a8693
25 changed files with 161 additions and 89 deletions
|
|
@ -2,6 +2,7 @@ import contextlib
|
|||
import os.path
|
||||
import sys
|
||||
import traceback
|
||||
from typing import Union
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit import five
|
||||
|
|
@ -32,8 +33,8 @@ def _log_and_exit(msg, exc, formatted):
|
|||
output.write_line(f'Check the log at {log_path}')
|
||||
|
||||
with open(log_path, 'wb') as log:
|
||||
def _log_line(*s): # type: (*str) -> None
|
||||
output.write_line(*s, stream=log)
|
||||
def _log_line(s: Union[None, str, bytes] = None) -> None:
|
||||
output.write_line(s, stream=log)
|
||||
|
||||
_log_line('### version information')
|
||||
_log_line()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue