mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
Fix argument type inference and organize imports
This commit is contained in:
+12
-4
@@ -1,10 +1,18 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
from typing import TYPE_CHECKING, TypedDict
|
||||
|
||||
import gradio as gr
|
||||
import modules.shared
|
||||
|
||||
import modules.extensions
|
||||
from modules.logger import log
|
||||
import modules.shared
|
||||
from modules.json_helpers import writefile
|
||||
from modules.logger import log
|
||||
|
||||
if TYPE_CHECKING:
|
||||
class FontParams(TypedDict):
|
||||
font: list[str]
|
||||
font_mono: list[str]
|
||||
|
||||
|
||||
gradio_theme = gr.themes.Base()
|
||||
@@ -89,7 +97,7 @@ def list_themes():
|
||||
def reload_gradio_theme():
|
||||
global gradio_theme # pylint: disable=global-statement
|
||||
theme_name = modules.shared.opts.gradio_theme
|
||||
default_font_params = {
|
||||
default_font_params: FontParams = {
|
||||
'font':['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
||||
'font_mono':['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user