fix: 修复 config_flow.py 类型注解错误
- 将 dict[str, any] 改为 dict[str, Any] - 添加 typing.Any 导入 这会导致 500 Internal Server Error Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d58bf08472
commit
66b86e3b74
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
@ -22,7 +24,7 @@ class SigMeshGatewayConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
VERSION = 1
|
VERSION = 1
|
||||||
|
|
||||||
async def async_step_user(
|
async def async_step_user(
|
||||||
self, user_input: dict[str, any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> FlowResult:
|
) -> FlowResult:
|
||||||
"""处理用户配置步骤."""
|
"""处理用户配置步骤."""
|
||||||
errors = {}
|
errors = {}
|
||||||
@ -79,7 +81,7 @@ class SigMeshGatewayOptionsFlow(config_entries.OptionsFlow):
|
|||||||
"""初始化选项流程."""
|
"""初始化选项流程."""
|
||||||
self.config_entry = config_entry
|
self.config_entry = config_entry
|
||||||
|
|
||||||
async def async_step_init(self, user_input: dict[str, any] | None = None) -> FlowResult:
|
async def async_step_init(self, user_input: dict[str, Any] | None = None) -> FlowResult:
|
||||||
"""管理选项."""
|
"""管理选项."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
return self.async_create_entry(title="", data=user_input)
|
return self.async_create_entry(title="", data=user_input)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user