mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
Fix Extension type inference
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from __future__ import annotations
|
||||
import os
|
||||
from datetime import datetime
|
||||
import git
|
||||
@@ -5,7 +6,7 @@ from modules import shared, errors
|
||||
from modules.paths import extensions_dir, extensions_builtin_dir
|
||||
|
||||
|
||||
extensions = []
|
||||
extensions: list[Extension] = []
|
||||
if not os.path.exists(extensions_dir):
|
||||
os.makedirs(extensions_dir)
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ sort_ordering = {
|
||||
}
|
||||
|
||||
|
||||
def get_installed(ext) -> extensions.Extension:
|
||||
installed: extensions.Extension = [e for e in extensions.extensions if (e.remote or '').startswith(ext['url'].replace('.git', ''))]
|
||||
def get_installed(ext):
|
||||
installed = [e for e in extensions.extensions if (e.remote or '').startswith(ext['url'].replace('.git', ''))]
|
||||
return installed[0] if len(installed) > 0 else None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user