mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
Add filenames option
This commit is contained in:
parent
b2b0d5929a
commit
ad0062a3bb
1 changed files with 2 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ def _parse_arguments(argv=None):
|
||||||
choices=[m.optName for m in MixedLineEndingOption],
|
choices=[m.optName for m in MixedLineEndingOption],
|
||||||
default='auto',
|
default='auto',
|
||||||
help='Replace line ending with the specified. Default is "auto"')
|
help='Replace line ending with the specified. Default is "auto"')
|
||||||
|
parser.add_argument('filenames', nargs='*', help='Filenames to fix')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-v',
|
'-v',
|
||||||
'--verbose',
|
'--verbose',
|
||||||
|
|
@ -59,7 +60,7 @@ def _parse_arguments(argv=None):
|
||||||
elif args.fix == 'lf':
|
elif args.fix == 'lf':
|
||||||
fix = MixedLineEndingOption.LF
|
fix = MixedLineEndingOption.LF
|
||||||
|
|
||||||
options = {'fix': fix, 'verbose': args.verbose}
|
options = {'fix': fix, 'filenames': args.filenames, 'verbose': args.verbose}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue