diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8575e3a..32f179c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,7 +7,7 @@ on the UTC date of the release. `Contributions `__ always welcomed! -Version 20210814 +Version 20210814.1 ================== * Updated EDDB (formerly IATA SXF) to be the new Berlin Brandenburg Airport (IATA BER) diff --git a/README.rst b/README.rst index b59a27f..0f8ad4e 100644 --- a/README.rst +++ b/README.rst @@ -2,9 +2,9 @@ airportsdata ============ -.. |ICAO| replace:: 28,866 +.. |ICAO| replace:: 28,865 -.. |IATA| replace:: 6,561 +.. |IATA| replace:: 6,560 .. |version| image:: https://img.shields.io/pypi/v/airportsdata.svg :target: https://pypi.org/project/airportsdata/ diff --git a/RELEASE.rst b/RELEASE.rst index de6c121..b8367c6 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -1,3 +1 @@ -Version 20210814 -================== * Updated EDDB (formerly IATA SXF) to be the new Berlin Brandenburg Airport (IATA BER) diff --git a/airportsdata/__init__.py b/airportsdata/__init__.py index f989c9f..5c01ecf 100644 --- a/airportsdata/__init__.py +++ b/airportsdata/__init__.py @@ -21,32 +21,32 @@ __project_name__ = __package__ # Release numbering follows the release data -__version__ = "20210608.3" +__version__ = '20210814.1' __min_python_version__ = (3, 6) -__author__ = "Mike Borsetti " -__copyright__ = "Copyright 2020- Mike Borsetti" -__license__ = "MIT" -__url__ = f"https://github.com/mborsetti/{__project_name__}" +__author__ = 'Mike Borsetti ' +__copyright__ = 'Copyright 2020- Mike Borsetti' +__license__ = 'MIT' +__url__ = f'https://github.com/mborsetti/{__project_name__}' -if "TypedDict" in globals(): +if 'TypedDict' in globals(): Airports = TypedDict( - "Airports", + 'Airports', { - "icao": str, - "iata": str, - "name": str, - "city": str, - "subd": str, - "country": str, - "elevation": float, - "lat": float, - "lon": float, - "tz": str, + 'icao': str, + 'iata': str, + 'name': str, + 'city': str, + 'subd': str, + 'country': str, + 'elevation': float, + 'lat': float, + 'lon': float, + 'tz': str, }, ) -def load(code_type: str = "ICAO") -> Dict[str, "Airports"]: +def load(code_type: str = 'ICAO') -> Dict[str, 'Airports']: """Loads airport data into a dict :param code_type: optional argument defining the key in the dictionary: 'ICAO' (default if omitted) or 'IATA' @@ -74,14 +74,14 @@ def load(code_type: str = "ICAO") -> Dict[str, "Airports"]: # # this_dir = Path(__file__).parent - key = "icao" if code_type.lower() == "icao" else "iata" + key = 'icao' if code_type.lower() == 'icao' else 'iata' airports = {} - with this_dir.joinpath("airports.csv").open(encoding="utf8") as f: - fieldnames = f.readline().replace('"', "").rstrip().split(",") + with this_dir.joinpath('airports.csv').open(encoding='utf8') as f: + fieldnames = f.readline().replace('"', '').rstrip().split(',') reader = csv.DictReader(f, fieldnames=fieldnames, quoting=csv.QUOTE_NONNUMERIC) for row in reader: airports[row[key]] = row - airports.pop("", None) + airports.pop('', None) return airports diff --git a/airportsdata/airports.csv b/airportsdata/airports.csv index fca042c..0244ce5 100644 --- a/airportsdata/airports.csv +++ b/airportsdata/airports.csv @@ -7676,8 +7676,7 @@ "EDCW","","Wismar Airport","Wismar","Mecklenburg-Vorpommern","DE",43,53.9144439697,11.4994440079,"Europe/Berlin" "EDCX","","Purkshof Airport","Rostock","Mecklenburg-Vorpommern","DE",66,54.1616668701,12.2486114502,"Europe/Berlin" "EDCY","","Spremberg-Welzow Airport","Welzow","Brandenburg","DE",374,51.5755577087,14.1369438171,"Europe/Berlin" -"EDDB","BER","Berlin Brandenburg Airport","Berlin","Brandenburg","DE",157,52.362167,13.500667, -"Europe/Berlin" +"EDDB","BER","Berlin Brandenburg Airport","Berlin","Brandenburg","DE",157,52.362167,13.500667,"Europe/Berlin" "EDDC","DRS","Dresden Airport","Dresden","Saxony","DE",755,51.1328010559,13.76720047,"Europe/Berlin" "EDDE","ERF","Erfurt Airport","Erfurt","Thuringia","DE",1036,50.979801178,10.9581003189,"Europe/Berlin" "EDDF","FRA","Frankfurt am Main International Airport","Frankfurt-am-Main","Hesse","DE",364,50.0264015198,8.543129921,"Europe/Berlin"