mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 20:16:53 +00:00
Use default flake8 config
This commit is contained in:
parent
634383cffd
commit
4575652bd2
16 changed files with 119 additions and 81 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue