mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 19:46:54 +00:00
cleanup some pep8 and flake issues
This commit is contained in:
parent
5abcaee46d
commit
6ff7af19ee
2 changed files with 9 additions and 3 deletions
|
|
@ -1,9 +1,10 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
|
||||
import sys
|
||||
import util
|
||||
|
||||
|
||||
def is_on_branch(protected):
|
||||
retval = False
|
||||
branch = util.cmd_output('git', 'symbolic-ref', 'HEAD')
|
||||
|
|
@ -12,9 +13,11 @@ def is_on_branch(protected):
|
|||
retval = True
|
||||
return retval
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-b', default='master', help='branch to disallow commits to')
|
||||
parser.add_argument(
|
||||
'-b', default='master', help='branch to disallow commits to')
|
||||
parser.add_argument('filenames', nargs='*', help='filenames to check.')
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue