Advent of Code 2019 Day 15 in Python
You have:

direction: Direction = {self.position + d: d for d in Direction}[path_to_destination[1]]


The dict is just mapping each key to key - self.position (I don't know your exact data models, but I'm going to assume that these are some kind of vector and that + and - behave in intuitive ways).  Hence:

direction = path_to_destination[1] - self.position


and maybe:

assert abs(direction) == 1


if you want to require that direction is a unit vector (again, I'm assuming your vector representation is reasonable and implements __abs__ to return the magnitude).