Apply typing to all of pre-commit-hooks

This commit is contained in:
Anthony Sottile 2019-01-31 19:19:10 -08:00
parent 63cc3414e9
commit 030bfac7e4
54 changed files with 401 additions and 264 deletions

View file

@ -2,6 +2,8 @@ from __future__ import print_function
import argparse
import sys
from typing import Optional
from typing import Sequence
BLACKLIST = [
b'BEGIN RSA PRIVATE KEY',
@ -15,7 +17,7 @@ BLACKLIST = [
]
def detect_private_key(argv=None):
def main(argv=None): # type: (Optional[Sequence[str]]) -> int
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Filenames to check')
args = parser.parse_args(argv)
@ -37,4 +39,4 @@ def detect_private_key(argv=None):
if __name__ == '__main__':
sys.exit(detect_private_key())
sys.exit(main())