refactor: remove redundant changes

This commit is contained in:
Vlad Stan 2023-01-20 15:59:44 +02:00
parent ea31e148ae
commit fa5d824eea
2 changed files with 3 additions and 7 deletions

View file

@ -151,7 +151,7 @@ def check_installed_extension(ext: InstallableExtension) -> bool:
if ext.zip_path not in zip_files:
ext.download_archive()
ext.extract_archive()
return False

View file

@ -138,10 +138,8 @@ async def get_installed_extension(ext_id: str, conn: Optional[Connection] = None
"SELECT * FROM installed_extensions WHERE id = ?",
(ext_id,),
)
if not row:
return None
return dict(row)
return dict(row) if row else None
async def get_installed_extensions(
@ -159,9 +157,7 @@ async def get_inactive_extensions(*, conn: Optional[Connection] = None) -> List[
"""SELECT id FROM installed_extensions WHERE NOT active""",
(),
)
return (
[ext[0] for ext in inactive_extensions] if len(inactive_extensions) != 0 else []
)
return [ext[0] for ext in inactive_extensions]
async def update_user_extension(