File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
"""Generate valid airport codes."""
2
2
from enum import Enum
3
3
4
- from pyairports .airports import AIRPORT_LIST
4
+ import airportsdata
5
+
6
+ AIRPORT_IATA_LIST = [
7
+ (v ["iata" ], v ["iata" ]) for v in airportsdata .load ().values () if v ["iata" ]
8
+ ]
5
9
6
- AIRPORT_IATA_LIST = list (
7
- {(airport [3 ], airport [3 ]) for airport in AIRPORT_LIST if airport [3 ] != "" }
8
- )
9
10
10
11
IATA = Enum ("Airport" , AIRPORT_IATA_LIST ) # type:ignore
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ dependencies = [
40
40
" datasets" ,
41
41
" typing_extensions" ,
42
42
" pycountry" ,
43
- " pyairports " ,
43
+ " airportsdata " ,
44
44
]
45
45
dynamic = [" version" ]
46
46
@@ -137,7 +137,7 @@ module = [
137
137
" uvicorn.*" ,
138
138
" fastapi.*" ,
139
139
" pycountry.*" ,
140
- " pyairports .*" ,
140
+ " airportsdata .*" ,
141
141
]
142
142
ignore_missing_imports = true
143
143
You can’t perform that action at this time.
0 commit comments