mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 09:27:21 +08:00
Use default flake8 config
This commit is contained in:
@ -60,12 +60,12 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
||||
if '' in md_args:
|
||||
parser.error('--markdown-linebreak-ext requires a non-empty argument')
|
||||
all_markdown = '*' in md_args
|
||||
# normalize all extensions; split at ',', lowercase, and force 1 leading '.'
|
||||
# normalize extensions; split at ',', lowercase, and force 1 leading '.'
|
||||
md_exts = [
|
||||
'.' + x.lower().lstrip('.') for x in ','.join(md_args).split(',')
|
||||
]
|
||||
|
||||
# reject probable "eaten" filename as extension (skip leading '.' with [1:])
|
||||
# reject probable "eaten" filename as extension: skip leading '.' with [1:]
|
||||
for ext in md_exts:
|
||||
if any(c in ext[1:] for c in r'./\:'):
|
||||
parser.error(
|
||||
|
Reference in New Issue
Block a user