From 212a4f4ec37d59b3f29f12d1c5195ecfb3f450ba Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 14 May 2023 20:21:28 +0000 Subject: [PATCH] Remove unused code and add types and a docstring. --- web_view.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/web_view.py b/web_view.py index f2d4e7b..0a569d9 100755 --- a/web_view.py +++ b/web_view.py @@ -380,20 +380,8 @@ def search_map_page(): ) -@app.route("/old_search") -def old_search_page(): - q = flask.request.args.get("q") - if not q: - return flask.render_template("search.html", hits=None, bbox_list=None) - hits = nominatim.lookup(q) - for hit in hits: - if "geotext" in hit: - del hit["geotext"] - bbox = [hit["boundingbox"] for hit in hits] - return flask.render_template("search.html", hits=hits, bbox_list=bbox) - - -def read_bounds_param(): +def read_bounds_param() -> list[float]: + """Read bounds parameter.""" return [float(i) for i in flask.request.args["bounds"].split(",")]