Move implementation detail from docstring to comment

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2022-10-14 15:34:06 +02:00
parent f8d031fb18
commit ca980c037f
+3 -5
View File
@@ -74,11 +74,9 @@ def quote_str(val) -> str:
return "\"{}\"".format(val)
def combination_pairs(values: List[T]) -> List[Tuple[T, T]]:
"""Return all pair combinations from input values.
The return value is cast, as older versions of mypy are unable to derive
the specific type returned by itertools.combinations_with_replacement.
"""
"""Return all pair combinations from input values."""
# The return value is cast, as older versions of mypy are unable to derive
# the specific type returned by itertools.combinations_with_replacement.
return typing.cast(
List[Tuple[T, T]],
list(itertools.combinations_with_replacement(values, 2))