diff --git a/modules/options.py b/modules/options.py index f73bff8a7..09328a428 100644 --- a/modules/options.py +++ b/modules/options.py @@ -1,8 +1,11 @@ from __future__ import annotations from dataclasses import dataclass +from typing import TYPE_CHECKING from installer import log +if TYPE_CHECKING: + from collections.abc import Callable def options_section(section_identifier: tuple[str, str], options_dict: dict[str, OptionInfo | LegacyOption]): for v in options_dict.values(): v.section = section_identifier @@ -16,9 +19,9 @@ class OptionInfo: label="", component=None, component_args=None, - onchange=None, section=None, refresh=None, + onchange: Callable | None = None, folder=False, submit=None, comment_before='',