mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
maintainers/scripts/remove-old-aliases.py: support quoted attrset keys
This commit is contained in:
parent
45fd7a61df
commit
61c2c744a1
1 changed files with 3 additions and 2 deletions
|
@ -100,11 +100,12 @@ def convert_to_throw(date_older_list: list[str]) -> list[tuple[str, str]]:
|
||||||
date_older_list.remove(line)
|
date_older_list.remove(line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
alias = before_equal.strip()
|
alias = before_equal
|
||||||
|
alias_unquoted = before_equal.strip('"')
|
||||||
after_equal_list = [x.strip(";:") for x in after_equal.split()]
|
after_equal_list = [x.strip(";:") for x in after_equal.split()]
|
||||||
|
|
||||||
converted = (
|
converted = (
|
||||||
f"{indent}{alias} = throw \"'{alias}' has been renamed to/replaced by"
|
f"{indent}{alias} = throw \"'{alias_unquoted}' has been renamed to/replaced by"
|
||||||
f" '{after_equal_list.pop(0)}'\";"
|
f" '{after_equal_list.pop(0)}'\";"
|
||||||
f' # Converted to throw {datetime.today().strftime("%Y-%m-%d")}'
|
f' # Converted to throw {datetime.today().strftime("%Y-%m-%d")}'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue