Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b491c7 commit f2be2eaCopy full SHA for f2be2ea
1 file changed
pre_commit/commands/migrate_config.py
@@ -22,9 +22,8 @@ def _migrate_map(contents):
22
lines = contents.splitlines(True)
23
i = 0
24
# Only loop on non empty configuration file
25
- if i < len(lines):
26
- while _is_header_line(lines[i]):
27
- i += 1
+ while i < len(lines) and _is_header_line(lines[i]):
+ i += 1
28
29
header = ''.join(lines[:i])
30
rest = ''.join(lines[i:])
0 commit comments