From dc6efe14ee249dfbe33f32b345e9557aceca5e1a Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Thu, 1 May 2025 02:30:50 +0100 Subject: [PATCH 1/2] Remove legacy formatters from ``py list`` error output --- src/manage/list_command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/manage/list_command.py b/src/manage/list_command.py index e1c2869..f449644 100644 --- a/src/manage/list_command.py +++ b/src/manage/list_command.py @@ -251,7 +251,8 @@ def execute(cmd): LOGGER.debug("Get formatter %s", cmd.format) formatter = FORMATTERS[cmd.format] except LookupError: - expect = ", ".join(sorted(FORMATTERS)) + formatters = FORMATTERS.keys() - {"legacy", "legacy-paths"} + expect = ", ".join(sorted(formatters)) raise ArgumentError(f"'{cmd.format}' is not a valid format; expect one of: {expect}") from None from .tagutils import tag_or_range, install_matches_any From f752c5fcdae70b4ae4f33010fbb0dc1e0ec5b67e Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Thu, 1 May 2025 02:33:42 +0100 Subject: [PATCH 2/2] expect -> expected --- src/manage/list_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manage/list_command.py b/src/manage/list_command.py index f449644..3431c66 100644 --- a/src/manage/list_command.py +++ b/src/manage/list_command.py @@ -253,7 +253,7 @@ def execute(cmd): except LookupError: formatters = FORMATTERS.keys() - {"legacy", "legacy-paths"} expect = ", ".join(sorted(formatters)) - raise ArgumentError(f"'{cmd.format}' is not a valid format; expect one of: {expect}") from None + raise ArgumentError(f"'{cmd.format}' is not a valid format; expected one of: {expect}") from None from .tagutils import tag_or_range, install_matches_any tags = []