-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .isbn import ISBN | ||
from .phone_numbers import PhoneNumber | ||
from .zip_codes import ZipCode | ||
from . import airports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Generate valid airport codes.""" | ||
from enum import Enum | ||
|
||
try: | ||
from pyairports.airports import AIRPORT_LIST | ||
except ImportError: | ||
raise ImportError( | ||
'The `airports` module requires "pyairports" to be installed. You can install it with "pip install pyairports"' | ||
) | ||
|
||
|
||
AIRPORT_IATA_LIST = list( | ||
{(airport[3], airport[3]) for airport in AIRPORT_LIST if airport[3] != ""} | ||
) | ||
|
||
IATA = Enum("Airport", AIRPORT_IATA_LIST) # type:ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,7 @@ module = [ | |
"vllm.*", | ||
"uvicorn.*", | ||
"fastapi.*", | ||
"pyairports.*", | ||
] | ||
ignore_missing_imports = true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters