def resolve_url(self, to):
    if isinstance(to, Promise):
        to = str(to)
    if (to is None):
        return None
    (args, kwargs) = (None, None)
    if (not isinstance(to, six.string_types)):
        if (len(to) > 2):
            (to, args, kwargs) = to
        elif (len(to) == 2):
            (to, kwargs) = to
    args = (args or ())
    kwargs = (kwargs or {})
    return resolve_url(to, *args, **kwargs)
def resolve_url(self, to):
    if isinstance(to, Promise):
        to = str(to)
    if (to is None):
        return None
    (args, kwargs) = (None, None)
    if (not isinstance(to, six.string_types)):
        if (len(to) > 2):
            (to, args, kwargs) = to
        elif (len(to) == 2):
            (to, kwargs) = to
    args = (args or ())
    kwargs = (kwargs or {})
    return resolve_url(to, *args, **kwargs)