Pylint cleanup (#74)

* Misc fixes

* Misc cleanup

* Add all_versions to blender_downloader.py

* More cleanup

* Fix issue with status not reporting engine info

* Misc fixes

* Misc cleanup

* Add all_versions to blender_downloader.py

* More cleanup

* Fix issue with status not reporting engine info
This commit is contained in:
2024-01-28 10:30:57 -06:00
committed by GitHub
parent d673d7d4bf
commit 9757ba9276
14 changed files with 79 additions and 57 deletions

View File

@@ -90,7 +90,7 @@ class FFMPEGDownloader(EngineDownloader):
return releases
@classmethod
def __all_versions(cls, system_os=None, cpu=None):
def all_versions(cls, system_os=None, cpu=None):
system_os = system_os or current_system_os()
cpu = cpu or current_system_cpu()
versions_per_os = {'linux': cls.__get_linux_versions, 'macos': cls.__get_macos_versions,
@@ -131,14 +131,14 @@ class FFMPEGDownloader(EngineDownloader):
try:
system_os = system_os or current_system_os()
cpu = cpu or current_system_cpu()
return cls.__all_versions(system_os, cpu)[0]
return cls.all_versions(system_os, cpu)[0]
except (IndexError, requests.exceptions.RequestException):
logger.error(f"Cannot get most recent version of ffmpeg")
return {}
@classmethod
def version_is_available_to_download(cls, version, system_os=None, cpu=None):
for ver in cls.__all_versions(system_os, cpu):
for ver in cls.all_versions(system_os, cpu):
if ver['version'] == version:
return ver
return None
@@ -149,7 +149,7 @@ class FFMPEGDownloader(EngineDownloader):
cpu = cpu or current_system_cpu()
# Verify requested version is available
found_version = [item for item in cls.__all_versions(system_os, cpu) if item['version'] == version]
found_version = [item for item in cls.all_versions(system_os, cpu) if item['version'] == version]
if not found_version:
logger.error(f"Cannot find FFMPEG version {version} for {system_os} and {cpu}")
return