mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Remove conversation from mypy ignore list (#74991)
This commit is contained in:
parent
63706d2f67
commit
7e0515b119
@ -80,10 +80,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
@websocket_api.async_response
|
||||
@websocket_api.websocket_command(
|
||||
{"type": "conversation/process", "text": str, vol.Optional("conversation_id"): str}
|
||||
)
|
||||
@websocket_api.async_response
|
||||
async def websocket_process(hass, connection, msg):
|
||||
"""Process text."""
|
||||
connection.send_result(
|
||||
@ -94,8 +94,8 @@ async def websocket_process(hass, connection, msg):
|
||||
)
|
||||
|
||||
|
||||
@websocket_api.async_response
|
||||
@websocket_api.websocket_command({"type": "conversation/agent/info"})
|
||||
@websocket_api.async_response
|
||||
async def websocket_get_agent_info(hass, connection, msg):
|
||||
"""Do we need onboarding."""
|
||||
agent = await _get_agent(hass)
|
||||
@ -109,8 +109,8 @@ async def websocket_get_agent_info(hass, connection, msg):
|
||||
)
|
||||
|
||||
|
||||
@websocket_api.async_response
|
||||
@websocket_api.websocket_command({"type": "conversation/onboarding/set", "shown": bool})
|
||||
@websocket_api.async_response
|
||||
async def websocket_set_onboarding(hass, connection, msg):
|
||||
"""Set onboarding status."""
|
||||
agent = await _get_agent(hass)
|
||||
|
@ -26,5 +26,5 @@ class AbstractConversationAgent(ABC):
|
||||
@abstractmethod
|
||||
async def async_process(
|
||||
self, text: str, context: Context, conversation_id: str | None = None
|
||||
) -> intent.IntentResponse:
|
||||
) -> intent.IntentResponse | None:
|
||||
"""Process a sentence."""
|
||||
|
@ -112,7 +112,7 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
|
||||
async def async_process(
|
||||
self, text: str, context: core.Context, conversation_id: str | None = None
|
||||
) -> intent.IntentResponse:
|
||||
) -> intent.IntentResponse | None:
|
||||
"""Process a sentence."""
|
||||
intents = self.hass.data[DOMAIN]
|
||||
|
||||
@ -129,3 +129,5 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
text,
|
||||
context,
|
||||
)
|
||||
|
||||
return None
|
||||
|
6
mypy.ini
6
mypy.ini
@ -2662,12 +2662,6 @@ ignore_errors = true
|
||||
[mypy-homeassistant.components.cloud.http_api]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.conversation]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.conversation.default_agent]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.evohome]
|
||||
ignore_errors = true
|
||||
|
||||
|
@ -18,8 +18,6 @@ from .model import Config, Integration
|
||||
IGNORED_MODULES: Final[list[str]] = [
|
||||
"homeassistant.components.cloud.client",
|
||||
"homeassistant.components.cloud.http_api",
|
||||
"homeassistant.components.conversation",
|
||||
"homeassistant.components.conversation.default_agent",
|
||||
"homeassistant.components.evohome",
|
||||
"homeassistant.components.evohome.climate",
|
||||
"homeassistant.components.lovelace",
|
||||
|
Loading…
x
Reference in New Issue
Block a user