From b49f2e96357bace4891fff99a16d3777b45e0e03 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 03:19:13 +0000 Subject: [PATCH 1/2] Initial plan From 43716d3b396e3c38a63c42bae2ac9e38a9101295 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 03:25:08 +0000 Subject: [PATCH 2/2] Remove unused flatten_literal_params function Co-authored-by: Lulalaby <14029133+Lulalaby@users.noreply.github.com> --- discord/utils.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/discord/utils.py b/discord/utils.py index 1a3612659a..1c4561f224 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1307,17 +1307,6 @@ def as_chunks(iterator: _Iter[T], max_size: int) -> _Iter[list[T]]: return _chunk(iterator, max_size) -def flatten_literal_params(parameters: Iterable[Any]) -> tuple[Any, ...]: - params = [] - literal_cls = type(Literal[0]) - for p in parameters: - if isinstance(p, literal_cls): - params.extend(p.__args__) - else: - params.append(p) - return tuple(params) - - def normalise_optional_params(parameters: Iterable[Any]) -> tuple[Any, ...]: none_cls = type(None) return tuple(p for p in parameters if p is not none_cls) + (none_cls,)