Improve FlowManager.async_finish_flow docstring (#126178)

* Improve FlowManager.async_finish_flow docstring

* Fix typos
This commit is contained in:
Erik Montnemery 2024-09-18 18:19:13 +02:00 committed by GitHub
parent 12dbabb849
commit 252ce2c95b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 5 deletions

View file

@ -1338,7 +1338,11 @@ class ConfigEntriesFlowManager(data_entry_flow.FlowManager[ConfigFlowResult]):
flow: data_entry_flow.FlowHandler[ConfigFlowResult],
result: ConfigFlowResult,
) -> ConfigFlowResult:
"""Finish a config flow and add an entry."""
"""Finish a config flow and add an entry.
This method is called when a flow step returns FlowResultType.ABORT or
FlowResultType.CREATE_ENTRY.
"""
flow = cast(ConfigFlow, flow)
# Mark the step as done.
@ -2660,6 +2664,9 @@ class OptionsFlowManager(data_entry_flow.FlowManager[ConfigFlowResult]):
) -> ConfigFlowResult:
"""Finish an options flow and update options for configuration entry.
This method is called when a flow step returns FlowResultType.ABORT or
FlowResultType.CREATE_ENTRY.
Flow.handler and entry_id is the same thing to map flow with entry.
"""
flow = cast(OptionsFlow, flow)