Coverage for F:\DEV\EMIZ\emiz\parking_spots.py : 45%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# coding=utf-8
# noinspection PyProtectedMember
parkings['FARP'] = {}
parkings['FARP'][farp.static_name] = farp.static_position
min_ = 50 res = None for airport in parkings: for spot in parkings[airport]: spot_pos = parkings[airport][spot] dist = math.hypot(unit_pos[0] - spot_pos[0], unit_pos[1] - spot_pos[1]) if dist < min_: min_ = dist res = ParkingSpot(airport=airport, spot=spot) return res |