mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
clear 'frozen: ...' comment if autoupdate unfreezes
This commit is contained in:
parent
cd57ba90f5
commit
35caf115f8
2 changed files with 9 additions and 2 deletions
|
|
@ -108,7 +108,9 @@ def _write_new_config(path, rev_infos):
|
|||
new_rev_s = ordered_dump({'rev': rev_info.rev}, **C.YAML_DUMP_KWARGS)
|
||||
new_rev = new_rev_s.split(':', 1)[1].strip()
|
||||
if rev_info.frozen is not None:
|
||||
comment = ' # {}'.format(rev_info.frozen)
|
||||
comment = ' # frozen: {}'.format(rev_info.frozen)
|
||||
elif match.group(4).strip().startswith('# frozen:'):
|
||||
comment = ''
|
||||
else:
|
||||
comment = match.group(4)
|
||||
lines[idx] = REV_LINE_FMT.format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue