mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-09 12:54:17 +00:00
Use default flake8 config
This commit is contained in:
parent
634383cffd
commit
4575652bd2
16 changed files with 119 additions and 81 deletions
|
|
@ -61,7 +61,10 @@ def fix_requirements(f): # type: (IO[bytes]) -> int
|
|||
# If we see a newline before any requirements, then this is a
|
||||
# top of file comment.
|
||||
if len(requirements) == 1 and line.strip() == b'':
|
||||
if len(requirement.comments) and requirement.comments[0].startswith(b'#'):
|
||||
if (
|
||||
len(requirement.comments) and
|
||||
requirement.comments[0].startswith(b'#')
|
||||
):
|
||||
requirement.value = b'\n'
|
||||
else:
|
||||
requirement.comments.append(line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue