From aafd09569c3b799c28d9adeea87d27bee337ac88 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 24 Dec 2020 02:20:49 -0800 Subject: [PATCH] Fix mypy error. --- gen/conflictgen.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen/conflictgen.py b/gen/conflictgen.py index 796e6507..d2bedfbe 100644 --- a/gen/conflictgen.py +++ b/gen/conflictgen.py @@ -84,6 +84,10 @@ class Conflict: def extend_ground_position(cls, initial: Point, max_distance: int, heading: int, theater: ConflictTheater) -> Point: """Finds the first intersection with an exclusion zone in one heading from an initial point up to max_distance""" extended = initial.point_from_heading(heading, max_distance) + if theater.landmap is None: + # TODO: Why is this possible? + return extended + p0 = ShapelyPoint(initial.x, initial.y) p1 = ShapelyPoint(extended.x, extended.y) line = LineString([p0, p1])