@app.route('/direct/<path:url>')
def direct(url):
    kwargs = {}
    for key in ('width', 'height', 'mode', 'quality', 'transform'):
        value = request.args.get(key) or request.args.get(key[0])
        if value != None:
            value = int(value) if value.isdigit() else value
            kwargs[key] = value
    return redirect(images.build_url(url, **kwargs))
dataset/ETHPy150Open mikeboers/Flask-Images/demo/main.py/direct/operator `is not` -> `!=`