diff --git a/tools/formatter.py b/tools/formatter.py index a89e620d..9ab82725 100644 --- a/tools/formatter.py +++ b/tools/formatter.py @@ -125,12 +125,12 @@ def remove_duplicate_points(entry: dict): Removes points from paths that occur twice after each other """ path: list = entry['path'] - last: list = path[0] + previous: list = path[0] for i in range(len(path)-1, -1, -1): current: list = path[i] - if current == last: + if current == previous: path.pop(i) - last = current + previous = current return entry