# Path: flatisfy/constants.py
# class TimeToModes(Enum):
#     PUBLIC_TRANSPORT = -1
#     WALK = 1
#     BIKE = 2
#     CAR = 3


import datetime
import itertools
import json
import logging
import math
import re
import time
import imagehash
import mapbox
import requests
import unidecode
from flatisfy.constants import TimeToModes
                                "geojson": section["geojson"],
                                "color": (section["display_informations"].get("color", None)),
                            }
                        )
                    elif section["type"] == "street_network":
                        # Walking
                        sections.append({"geojson": section["geojson"], "color": None})
                    else:
                        # Skip anything else
                        continue
            except (
                requests.exceptions.RequestException,
                ValueError,
                IndexError,
                KeyError,
            ) as exc:
                # Ignore any possible exception
                LOGGER.warning(
                    "An exception occurred during travel time lookup on Navitia: %s.",
                    str(exc),
                )
        else:
            LOGGER.warning(
                "No API key available for travel time lookup. Please provide "
                "a Navitia API key. Skipping travel time lookup."
            )
    elif mode in [TimeToModes.WALK, TimeToModes.BIKE, TimeToModes.CAR]:
        MAPBOX_MODES = {
            TimeToModes.WALK: "mapbox/walking",
            TimeToModes.BIKE: "mapbox/cycling",

# Path: flatisfy/constants.py
# class TimeToModes(Enum):
#     PUBLIC_TRANSPORT = -1
#     WALK = 1
#     BIKE = 2
#     CAR = 3


# Path: flatisfy/tools.py
import datetime
import itertools
import json
import logging
import math
import re
import time
import imagehash
import mapbox
import requests
import unidecode
from flatisfy.constants import TimeToModes

                                "geojson": section["geojson"],
                                "color": (section["display_informations"].get("color", None)),
                            }
                        )
                    elif section["type"] == "street_network":
                        # Walking
                        sections.append({"geojson": section["geojson"], "color": None})
                    else:
                        # Skip anything else
                        continue
            except (
                requests.exceptions.RequestException,
                ValueError,
                IndexError,
                KeyError,
            ) as exc:
                # Ignore any possible exception
                LOGGER.warning(
                    "An exception occurred during travel time lookup on Navitia: %s.",
                    str(exc),
                )
        else:
            LOGGER.warning(
                "No API key available for travel time lookup. Please provide "
                "a Navitia API key. Skipping travel time lookup."
            )
    elif mode in [TimeToModes.WALK, TimeToModes.BIKE, TimeToModes.CAR]:
        MAPBOX_MODES = {
            TimeToModes.WALK: "mapbox/walking",
            TimeToModes.BIKE: "mapbox/cycling",

            TimeToModes.CAR: "mapbox/driving",