Add Callable type annotation to onchange

This commit is contained in:
awsr
2025-12-19 00:30:11 -08:00
parent 878f2f5aa6
commit f8b812b68e
+4 -1
View File
@@ -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='',