diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-06 10:33:53 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-06 10:33:53 +0100 |
| commit | b6898e9503fda2b7f7ae4366da0895c0e140c133 (patch) | |
| tree | 5ed29353b480a88a3c970d797de93622e821b44c | |
| parent | 7f66e5c211ced9bc0286b893b9a86534fe9ec43a (diff) | |
| download | tdde25-b6898e9503fda2b7f7ae4366da0895c0e140c133.tar.gz | |
remobe unnecessary globals
| -rw-r--r-- | server.py | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -17,7 +17,6 @@ def index(): @get('/show-area') def show_area(): - global nodes rect = dict() for (k, node) in enumerate(store.select_nodes_in_rectangle(nodes, 58.3984, 58.3990, 15.5733, 15.576)): rect[node.id] = node.coord_tuple() @@ -26,7 +25,6 @@ def show_area(): @post('/shortest-path') def shortest_path(body): - global nodes body = json.loads(body) source_id = algorithms.get_closest_node_id(nodes, store.Node(-1, body['lat1'], body['lng1'])) target_id = algorithms.get_closest_node_id(nodes, store.Node(-1, body['lat2'], body['lng2'])) |
