def minify(tokens, options):
    """
    Performs minification on *tokens* according to the values in *options*
    """
    # Remove comments
    remove_comments(tokens)
    # Remove docstrings
    remove_docstrings(tokens)
    result = token_utils.untokenize(tokens)
    # Minify our input script
    result = multiline_indicator.sub('', result)
    result = fix_empty_methods(result)
    result = join_multiline_pairs(result)
    result = join_multiline_pairs(result, '[]')
    result = join_multiline_pairs(result, '{}')
    result = remove_blank_lines(result)
    result = reduce_operators(result)
    result = dedent(result, use_tabs=options.tabs)
    return result
def minify ( tokens , options ) : remove_comments ( tokens ) remove_docstrings ( tokens ) result = token_utils . untokenize ( tokens ) result = multiline_indicator . sub ( '' , result ) result = fix_empty_methods ( result ) result = join_multiline_pairs ( result ) result = join_multiline_pairs ( result , '[]' ) result = join_multiline_pairs ( result , '{}' ) result = remove_blank_lines ( result ) result = reduce_operators ( result ) result = dedent ( result , use_tabs = options . tabs ) return result
Performs minification on *tokens* according to the values in *options*