Skip to content

Commit 088f57b

Browse files
Preserve quotes (#78)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent df1b1d7 commit 088f57b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

migration_fixer/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ def _decode_message(output: bytes, encoding: str) -> str:
2222

2323
def _update_migration(conflict_path: Path, app_label: str, seen: List[str]) -> None:
2424
"""Modify the migration file."""
25-
replacement = "('{app_label}', '{prev_migration}'),".format(
26-
app_label=app_label,
27-
prev_migration=seen[-1],
28-
)
25+
prev_migration = seen[-1]
26+
27+
replacement = f'("{app_label}", "{prev_migration}"),'
2928

3029
replace_regex = re.compile(
3130
MIGRATION_REGEX.format(app_label=app_label),

0 commit comments

Comments
 (0)