

def _get_td_css(h, v, td_styles):
    if h:
        if isinstance(td_styles, string_types):
            return td_styles
        elif callable(td_styles):
            return td_styles(v)
        elif isinstance(td_styles, dict):
            if (h in td_styles):
                s = td_styles[h]
                if isinstance(s, string_types):
                    return s
                elif callable(s):
                    return s(v)
                else:
                    raise ArgumentError(('expected string or callable, got %r' % s))
        else:
            raise ArgumentError(('expected string, callable or dict, got %r' % td_styles))
    if (isinstance(v, numeric_types) and (not isinstance(v, bool))):
        return 'text-align: right'
    else:
        return ''

dataset/ETHPy150Open alimanfoo/petl/petl/io/html.py _get_td_css/VarMisuse@15/22 `td_styles`->`h`