diff --git a/charset_normalizer/cd.py b/charset_normalizer/cd.py index 47044c03..9053d601 100644 --- a/charset_normalizer/cd.py +++ b/charset_normalizer/cd.py @@ -324,7 +324,7 @@ def coherence_ratio( sequence_frequencies = Counter(layer) # type: Counter most_common = sequence_frequencies.most_common() - character_count = sum([o for c, o in most_common]) # type: int + character_count = sum(o for c, o in most_common) # type: int if character_count <= TOO_SMALL_SEQUENCE: continue diff --git a/charset_normalizer/md.py b/charset_normalizer/md.py index 668ee780..622d48c2 100644 --- a/charset_normalizer/md.py +++ b/charset_normalizer/md.py @@ -538,7 +538,7 @@ def mess_ratio( if ( index > 0 and index % intermediary_mean_mess_ratio_calc == 0 ) or index == length - 1: - mean_mess_ratio = sum([dt.ratio for dt in detectors]) + mean_mess_ratio = sum(dt.ratio for dt in detectors) if mean_mess_ratio >= maximum_threshold: break