mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
Move LegacyOption back to shared_legacy.py
Seems like Python doesn't actually consider it a circular import in this instance.
This commit is contained in:
+1
-5
@@ -7,6 +7,7 @@ from installer import log
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
from gradio.components import Component
|
||||
from modules.shared_legacy import LegacyOption
|
||||
from modules.ui_components import DropdownEditable
|
||||
|
||||
|
||||
@@ -117,11 +118,6 @@ class OptionInfo:
|
||||
return f'OptionInfo: label="{self.label}" section="{self.section}" component="{self.component}" default="{self.default}" refresh="{self.refresh is not None}" change="{self.onchange is not None}" args={args} choices={choices}'
|
||||
|
||||
|
||||
class LegacyOption(OptionInfo):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
@dataclass
|
||||
class OptionsCategory:
|
||||
id: str
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import os
|
||||
import gradio as gr
|
||||
from modules import paths
|
||||
from modules.options import LegacyOption, options_section
|
||||
from modules.options import OptionInfo, options_section
|
||||
|
||||
|
||||
class LegacyOption(OptionInfo):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
legacy_options = options_section(('legacy_options', "Legacy options"), {
|
||||
|
||||
Reference in New Issue
Block a user