def expand_statement_value(snippet, separator):
    """Expands a statement's unit value. (Internal)

        "margin: 3"    => "margin: 3px"
        "margin: 3px"  => "margin: 3px"
        "margin:3px"   => "margin: 3px"

    skip it if it's say 'p:before' or anything selector-like.
    this will also return the same thing for "complete" rules
    (eg: "margin: auto"), thereby adding semicolons to them.
    """
    # skip non-rules (must match "x: y")
    m = rule_expr.match(snippet)
    if not m: return

    # skip "complete" rules ("...;")
    if semicolon_expr.match(snippet): return

    prop, value = m.group(1), m.group(2) # ("margin", "3")
    if is_selectorlike(value): return

    # skip imbalanced rules (eg, opening of `scaleX(`)
    if value.count('(') != value.count(')'): return

    new_value = expand_full_value(value, prop)
    return (prop, separator, new_value or value) % "%s%s %s"
dataset/ETHPy150Open rstacruz/vim-hyperstyle/python/hyperstyle.py/expand_statement_value/swapped operands of `%`