commit c9454d17c8e75f89ad22094609eb8e8d4cb0ea36 Author: Vaydheesh Date: Sun Apr 14 15:30:51 2019 +0530 Implemented changes suggested - Removed: Redundant ZipFile.close method(with context manager) - Merged Lines: key and value in a single line, in apertium_windows{} diff --git a/installer.py b/installer.py index abe5e7f..929e1f8 100644 --- a/installer.py +++ b/installer.py @@ -28,17 +28,15 @@ class Installer: # Extract the zip with ZipFile(zip_download_path) as zip_file: zip_file.extractall(path=extract_path) - zip_file.close() - self._logger.info("%s Extraction completed", zip_name) - os.remove(zip_download_path) - self._logger.info("%s removed", zip_name) + self._logger.info("%s Extraction completed", zip_name) + os.remove(zip_download_path) + self._logger.info("%s removed", zip_name) def _download_apertium_windows(self): # type: (Installer) -> None """Installs Apertium-all-dev to %localappdata%""" apertium_windows = { - "apertium-all-dev.zip": - "/win64/nightly/apertium-all-dev.zip" + "apertium-all-dev.zip": "/win64/nightly/apertium-all-dev.zip", } self._download_zips(apertium_windows, self._install_path)