def distances_from_diffs_avglen(difftool, # type: Tuple[str, str, List[str]]
diffargs, # type: List[Tuple[str, bytes]]
cache=None, # type: Optional[Cache]
ccmode=CC_PROCESSES # type: str
):
# type: (...) -> Iterator[Tuple[Sequence[int], Iterable[int]]]
"""Returns pairs of (m, l) where m is the diff metric and l is the average line length
difference. This improves the metric just a tiny bit.
"""
metrics = distances_from_diffs(difftool, diffargs, cache=cache, ccmode=ccmode)
lldiffs = avg_linelength_diffs(diffargs)
return izip(metrics, lldiffs)
评论列表
文章目录