Skip to content

Commit 5ddd192

Browse files
CopilotLulalaby
andauthored
Remove unused flatten_literal_params function (#2989)
* Initial plan * Remove unused flatten_literal_params function Co-authored-by: Lulalaby <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Lulalaby <[email protected]>
1 parent 4be31e3 commit 5ddd192

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

discord/utils.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,17 +1307,6 @@ def as_chunks(iterator: _Iter[T], max_size: int) -> _Iter[list[T]]:
13071307
return _chunk(iterator, max_size)
13081308

13091309

1310-
def flatten_literal_params(parameters: Iterable[Any]) -> tuple[Any, ...]:
1311-
params = []
1312-
literal_cls = type(Literal[0])
1313-
for p in parameters:
1314-
if isinstance(p, literal_cls):
1315-
params.extend(p.__args__)
1316-
else:
1317-
params.append(p)
1318-
return tuple(params)
1319-
1320-
13211310
def normalise_optional_params(parameters: Iterable[Any]) -> tuple[Any, ...]:
13221311
none_cls = type(None)
13231312
return tuple(p for p in parameters if p is not none_cls) + (none_cls,)

0 commit comments

Comments
 (0)