Skip to content

Commit

Permalink
Remove Broken pyairports Package, Replace with airportsdata
Browse files Browse the repository at this point in the history
  • Loading branch information
lapp0 committed Sep 16, 2024
1 parent cfde8b7 commit 08c49e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions outlines/types/airports.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Generate valid airport codes."""
from enum import Enum

from pyairports.airports import AIRPORT_LIST
import airportsdata

AIRPORT_IATA_LIST = [(iata, iata) for iata in sorted(airportsdata.load().keys())]

AIRPORT_IATA_LIST = list(
{(airport[3], airport[3]) for airport in AIRPORT_LIST if airport[3] != ""}
)

IATA = Enum("Airport", AIRPORT_IATA_LIST) # type:ignore
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies = [
"datasets",
"typing_extensions",
"pycountry",
"pyairports",
"airportsdata",
]
dynamic = ["version"]

Expand Down Expand Up @@ -137,7 +137,7 @@ module = [
"uvicorn.*",
"fastapi.*",
"pycountry.*",
"pyairports.*",
"airportsdata.*",
]
ignore_missing_imports = true

Expand Down

0 comments on commit 08c49e7

Please sign in to comment.