It might be an indentation and logic error. Try this:
def customOffsetGatesMtH(aircraftData):
table = {
0: 11.00,
380: 10.50,
}
table787 = {
0: 11.50,
8: 11.50,
9: 11.50,
10: 11.50,
}
table777 = {
0: 11.00,
200: 11.00,
300: 11.00,
}
if aircraftData.idMajor == 777:
return Distance.fromMeters(table777.get(aircraftData.idMinor, 11.00) - 0.25)
elif aircraftData.idMajor == 787:
return Distance.fromMeters(table787.get(aircraftData.idMinor, 11.50) - 0.25)
elif aircraftData.idMajor == 380: # Adding A380 recognition
return Distance.fromMeters(table.get(aircraftData.idMajor, 10.50) - 0.25)
else:
try:
return Distance.fromMeters(table.get(aircraftData.idMinor, 11.00) - 0.25)
except:
return Distance() # Fallback if no match is found