(value, value_type, max_length=5, min_length=None, decimal_units=False)
Format the count for something that will fit on a key.
Format the count for something that will fit on a key.
Format the count for something that will fit on a key .
def format_amount(value, value_type, max_length=5, min_length=None, decimal_units=False):
    """Format the count for something that will fit on a key."""
    if value_type == 'press':
        return shorten_number(value, limit=max_length, sig_figures=min_length, decimal_units=decimal_units)
    elif value_type == 'time':
        return ticks_to_seconds(value, 60, output_length=1, allow_decimals=False, short=True)
def format_amount ( value , value_type , max_length = 5 , min_length = None , decimal_units = False ) : if value_type == 'press' : return shorten_number ( value , limit = max_length , sig_figures = min_length , decimal_units = decimal_units ) elif value_type == 'time' : return ticks_to_seconds ( value , 60 , output_length = 1 , allow_decimals = False , short = True )