diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-09-13 00:12:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-13 00:12:06 +0000 |
commit | a5158e8acea3ec8a97d618bb3f84df43e5f0c3e9 (patch) | |
tree | 452e4ff2e1c940f40f0e2deb66ff9d137036a7b1 /maintainers/scripts | |
parent | ff303118b2ec262eb342eab88ae79318fac66d52 (diff) | |
parent | f4a33546bdb5f81bd6cceb1b3cb19667145fed83 (diff) |
Merge master into haskell-updates
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/remove-old-aliases.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/maintainers/scripts/remove-old-aliases.py b/maintainers/scripts/remove-old-aliases.py index 8f04a9be4f174..3c5f8edc50adf 100755 --- a/maintainers/scripts/remove-old-aliases.py +++ b/maintainers/scripts/remove-old-aliases.py @@ -102,12 +102,13 @@ def convert_to_throw(date_older_list: list[str]) -> list[tuple[str, str]]: alias = before_equal alias_unquoted = before_equal.strip('"') - after_equal_list = [x.strip(";:") for x in after_equal.split()] + replacement = next(x.strip(";:") for x in after_equal.split()) + replacement = replacement.removeprefix("pkgs.") converted = ( - f"{indent}{alias} = throw \"'{alias_unquoted}' has been renamed to/replaced by" - f" '{after_equal_list.pop(0)}'\";" - f' # Converted to throw {datetime.today().strftime("%Y-%m-%d")}' + f"{indent}{alias} = throw \"'{alias_unquoted}' has been" + f" renamed to/replaced by '{replacement}'\";" + f" # Converted to throw {datetime.today().strftime('%Y-%m-%d')}" ) converted_list.append((line, converted)) |