MCPcopy Index your code
hub / github.com/python/cpython / _flatten_literal_params

Function _flatten_literal_params

Lib/typing.py:387–395  ·  view source on GitHub ↗

Internal helper for Literal creation: flatten Literals among parameters.

(parameters)

Source from the content-addressed store, hash-verified

385 return new_unhashable
386
387def _flatten_literal_params(parameters):
388 """Internal helper for Literal creation: flatten Literals among parameters."""
389 params = []
390 for p in parameters:
391 if isinstance(p, _LiteralGenericAlias):
392 params.extend(p.__args__)
393 else:
394 params.append(p)
395 return tuple(params)
396
397
398_cleanups = []

Callers 1

LiteralFunction · 0.85

Calls 2

extendMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…