hstt/main.py
def codes_stats(results: List[Result]) -> List[str]:
    """Calculate and format lines return codes / errors across results."""
    lines = []
    with_codes = Counter([r.status for r in results if r.status])
    with_errors = Counter([r.error for r in results if r.error])
    for code, count in with_codes.items():
        lines.append(f'{code:<10}: {count:>6} ({count * 100 / len(results):6.2f}%)')
    for error, count in with_errors.items():
        lines.append(f'{error:<10}: {count:>6} ({count * 100 / len(results):6.2f}%)')
    return lines
Calculate and format lines return codes / errors across results.
Calculate and format lines return codes / errors across results.
Calculate and format lines return codes / errors across results .
def codes_stats(results: List[Result]) -> List[str]:
    lines = []
    with_codes = Counter([r.status for r in results if r.status])
    with_errors = Counter([r.error for r in results if r.error])
    for code, count in with_codes.items():
        lines.append(f'{code:<10}: {count:>6} ({count * 100 / len(results):6.2f}%)')
    for error, count in with_errors.items():
        lines.append(f'{error:<10}: {count:>6} ({count * 100 / len(results):6.2f}%)')
    return lines
def codes_stats ( results : List [ Result ] ) -> List [ str ] : lines = [ ] with_codes = Counter ( [ r . status for r in results if r . status ] ) with_errors = Counter ( [ r . error for r in results if r . error ] ) for code , count in with_codes . items ( ) : lines . append ( f'{code:<10}: {count:>6} ({count * 100 / len(results):6.2f}%)' ) for error , count in with_errors . items ( ) : lines . append ( f'{error:<10}: {count:>6} ({count * 100 / len(results):6.2f}%)' ) return lines
Calculate and format lines return codes / errors across results.
Calculate and format lines return codes / errors across results .
"""Calculate and format lines return codes / errors across results."""
results
List[Result]