Move implementation detail from docstring to comment

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2022-09-16 22:26:38 +02:00
parent 7b3fa657af
commit 4537d6d838

View file

@ -74,11 +74,9 @@ def quote_str(val) -> str:
return "\"{}\"".format(val) return "\"{}\"".format(val)
def combination_pairs(values: List[T]) -> List[Tuple[T, T]]: def combination_pairs(values: List[T]) -> List[Tuple[T, T]]:
"""Return all pair combinations from input values. """Return all pair combinations from input values."""
# The return value is cast, as older versions of mypy are unable to derive
The return value is cast, as older versions of mypy are unable to derive # the specific type returned by itertools.combinations_with_replacement.
the specific type returned by itertools.combinations_with_replacement.
"""
return typing.cast( return typing.cast(
List[Tuple[T, T]], List[Tuple[T, T]],
list(itertools.combinations_with_replacement(values, 2)) list(itertools.combinations_with_replacement(values, 2))