From accdfedab65fa1832543e3362230818e9f40dd5c Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sat, 25 Jul 2026 13:07:48 +0200 Subject: [PATCH] Sort help args to make them reproducible get_help_option_names() uses a set which is not ordered. The return value is used by mkdocs-click making the mkdocs-doc package in Debian not reproducible: https://reproduce.debian.net/all/unstable.html#mkdocs-doc --- src/click/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/click/core.py b/src/click/core.py index 6f483675d..93c2d177c 100644 --- a/src/click/core.py +++ b/src/click/core.py @@ -1180,7 +1180,7 @@ def get_help_option_names(self, ctx: Context) -> list[str]: for param in self.params: all_names.difference_update(param.opts) all_names.difference_update(param.secondary_opts) - return list(all_names) + return sorted(all_names) def get_help_option(self, ctx: Context) -> Option | None: """Returns the help option object.