# Path: pyFileFixity/lib/tqdm/_utils.py
# def _is_utf(encoding):
# def _supports_unicode(file):
# def _environ_cols(file):  # pragma: no cover


from ._utils import _supports_unicode, _environ_cols, _range, _unich
import sys
import time
    if total:
        frac = n / total
        percentage = frac * 100

        remaining_str = format_interval(elapsed * (total-n) / n) if n else '?'

        l_bar = '{1}{0:.0f}%|'.format(percentage, prefix) if prefix else \
                '{0:3.0f}%|'.format(percentage)
        r_bar = '| {0}/{1}{2} [{3}<{4}, {5} {6}/s]'.format(
                n_fmt, total_fmt, unit, elapsed_str, remaining_str,
                rate, rate_unit)

        if ncols == 0:
            bar = ''
        else:
            N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols \
                             else 10

            if ascii:
                bar_length, frac_bar_length = divmod(
                    int(frac * N_BARS * 10), 10)

                bar = '#'*bar_length
                frac_bar = chr(48 + frac_bar_length) if frac_bar_length \
                                else ' '

            else:
                bar_length, frac_bar_length = divmod(int(frac * N_BARS * 8), 8)

                bar = _unich(0x2588)*bar_length

# Path: pyFileFixity/lib/tqdm/_utils.py
# def _is_utf(encoding):
# def _supports_unicode(file):
# def _environ_cols(file):  # pragma: no cover


# Path: pyFileFixity/lib/tqdm/_tqdm.py
from ._utils import _supports_unicode, _environ_cols, _range, _unich
import sys
import time

    if total:
        frac = n / total
        percentage = frac * 100

        remaining_str = format_interval(elapsed * (total-n) / n) if n else '?'

        l_bar = '{1}{0:.0f}%|'.format(percentage, prefix) if prefix else \
                '{0:3.0f}%|'.format(percentage)
        r_bar = '| {0}/{1}{2} [{3}<{4}, {5} {6}/s]'.format(
                n_fmt, total_fmt, unit, elapsed_str, remaining_str,
                rate, rate_unit)

        if ncols == 0:
            bar = ''
        else:
            N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols \
                             else 10

            if ascii:
                bar_length, frac_bar_length = divmod(
                    int(frac * N_BARS * 10), 10)

                bar = '#'*bar_length
                frac_bar = chr(48 + frac_bar_length) if frac_bar_length \
                                else ' '

            else:
                bar_length, frac_bar_length = divmod(int(frac * N_BARS * 8), 8)

                bar = _unich(0x2588)*bar_length

                frac_bar = _unich(0x2590 - frac_bar_length) \