-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
in flight.py, the _classify_arg() function may benefit from these changes or similar ones:
- CO2 condition
Change endswith to in, some entries have CO2e
elif 'CO2' in arg and self._co2 is None: - Emissions condition
Change endswith to in and handle or omit case sensitivity on E
elif 'missions' in arg and self._emissions is None: - Stops condition
Add possibility of minutes without hours in stop time
elif (('hr' in arg or 'min' in arg) and arg[-3:].isupper()) or (len(arg.split(', ')) > 1 and arg.isupper()):
Add additional stop condition which catches layovers reported as an airport without a duration
elif len(arg) == 3 and arg.isupper() and not self._origin is None and not self._dest is None:
self._stops = arg - Airlines condition
Adjust criteria to catch and omit a few more different cases that were appearing in results
elif len(arg) > 3 and arg != 'Separate tickets booked together' and arg != 'Change of airport' and not 'hr' in arg and not 'min' in arg:
in flight.py, the _parse_args() function may benefit from this change and similar ones:
- Airline Placeholder
After parsing, put in a placeholder for missing airline
if self._airline is None or self._airline == "" or len(self._airline) < 2:
self._airline = "--"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels