From 627afcc4aa63e58da682422d5f6feb9bdb7b4672 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 11:43:07 -0800 Subject: [PATCH 01/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index c98de80f9..6e27090bd 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -130,8 +130,7 @@ async def resume_dialog( :type dialog_context: :class:`DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` - :param result: Optional, value returned from the dialog that was called. The type of the - value returned is dependent on the child dialog. + :param result: Optional, value returned from the dialog that was called. :type result: object :return: Signals the end of the turn :rtype: :class:`Dialog.end_of_turn` @@ -167,8 +166,7 @@ async def end_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` - :param instance: State information associated with the instance of this component dialog - on its parent's dialog stack. + :param instance: State information associated with the instance of this component dialog. :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` @@ -242,8 +240,7 @@ async def on_end_dialog( # pylint: disable=unused-argument :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` - :param instance: State information associated with the instance of this component dialog on - its parent's dialog stack. + :param instance: State information associated with the instance of this component dialog. :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` From e2f19ed35a0ba44d031e4a56c9a83c0cc781b4ee Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 12:03:47 -0800 Subject: [PATCH 02/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 6e27090bd..8aa4c18de 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -132,8 +132,8 @@ async def resume_dialog( :type reason: :class:`DialogReason` :param result: Optional, value returned from the dialog that was called. :type result: object - :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :return Dialog.end_of_turn: Signals the end of the turn + :rtype Dialog.end_of_turn: :class:`Dialog.end_of_turn` """ await self.reprompt_dialog(dialog_context.context, dialog_context.active_dialog) @@ -183,8 +183,9 @@ def add_dialog(self, dialog: Dialog) -> object: Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :return: The updated :class:`ComponentDialog` - :rtype: :class:`ComponentDialog` + :type dialog: :class:`Dialog` + :return self: The updated :class:`ComponentDialog` + :rtype self: :class:`ComponentDialog` """ self._dialogs.add(dialog) if not self.initial_dialog_id: @@ -196,8 +197,9 @@ def find_dialog(self, dialog_id: str) -> Dialog: Finds a dialog by ID. :param dialog_id: The dialog to add. + :type dialog_id: str :return: The dialog; or None if there is not a match for the ID. - :rtype: :class:Dialog + :rtype: :class:`Dialog` """ return self._dialogs.find(dialog_id) @@ -253,8 +255,7 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`DialogInstance` - :param instance: State information associated with the instance of this component dialog - on its parent's dialog stack. + :param instance: State information associated with the instance of this component dialog. :type instance: :class:`DialogInstance` """ return @@ -278,8 +279,8 @@ async def end_component( The returned :class:`DialogTurnResult`contains the return value in its :class:`DialogTurnResult.result` property. - :param outer_dc: The parent class:`DialogContext` for the current turn of conversation. - :type outer_dc: class:`DialogContext` + :param outer_dc: The parent :class:`DialogContext` for the current turn of conversation. + :type outer_dc: :class:`DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return: Value to return. From 6cb30cbf1f3857fd3680e462cea6a82642320c0e Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 12:23:57 -0800 Subject: [PATCH 03/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 8aa4c18de..190061423 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -15,7 +15,7 @@ class ComponentDialog(Dialog): """ - A :class:`Dialog` that is composed of other dialogs + A :class:`botbuilder.dialogs.Dialog` that is composed of other dialogs A component dialog has an inner :class:`DialogSet` :class:`DialogContext`, which provides an inner dialog stack that is hidden from the parent dialog. @@ -97,7 +97,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu :param dialog_context: The parent :class:`DialogContext` for the current turn of the conversation. :type dialog_context: :class:`DialogContext` :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :rtype: :var:`Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -198,8 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The dialog; or None if there is not a match for the ID. - :rtype: :class:`Dialog` + :return: The :class:`Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) @@ -283,7 +282,7 @@ async def end_component( :type outer_dc: :class:`DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object - :return: Value to return. - :rtype: :class:`DialogTurnResult.result` + :return : Value to return. + :rtype: :var:`DialogTurnResult.result` """ return await outer_dc.end_dialog(result) From 74d2a0aba7ebdf60cd544140f6541bb889e5719d Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 13:07:03 -0800 Subject: [PATCH 04/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 190061423..1fb054ce9 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -17,7 +17,7 @@ class ComponentDialog(Dialog): """ A :class:`botbuilder.dialogs.Dialog` that is composed of other dialogs - A component dialog has an inner :class:`DialogSet` :class:`DialogContext`, + A component dialog has an inner :class:`botbuilder.dialogs.DialogSet` :class:`botbuilder.dialogs.DialogContext`, which provides an inner dialog stack that is hidden from the parent dialog. :var persisted_dialog state: @@ -52,12 +52,12 @@ async def begin_dialog( If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. - :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :rtype: :var:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") From 06130a345156209195b89cc29f4a3df593c09094 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 13:33:12 -0800 Subject: [PATCH 05/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 1fb054ce9..c6887abfb 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -88,14 +88,14 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu contain a return value. If this method is *not* overriden the component dialog calls the - :meth:`DialogContext.continue_dialog` method on it's inner dialog + :meth:`botbuilder.dialogs.DialogContext.continue_dialog` method on it's inner dialog context. If the inner dialog stack is empty, the component dialog ends, - and if a :class:`DialogTurnResult.result` is available, the component dialog + and if a :var:`botbuilder.dialogs.DialogTurnResult.result` is available, the component dialog uses that as it's return value. - :param dialog_context: The parent :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn :rtype: :var:`Dialog.end_of_turn` """ @@ -126,8 +126,8 @@ async def resume_dialog( To avoid the container prematurely ending we need to implement this method and simply ask our inner dialog stack to re-prompt. - :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` :param result: Optional, value returned from the dialog that was called. @@ -148,7 +148,7 @@ async def reprompt_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information for this dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` """ # Delegate to inner dialog. dialog_state = instance.state[self.persisted_dialog_state] @@ -167,9 +167,9 @@ async def end_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. - :type reason: :class:`DialogReason` + :type reason: :class:`botbuilder.dialogs.DialogReason` """ # Forward cancel to inner dialog if reason == DialogReason.CancelCalled: @@ -183,7 +183,7 @@ def add_dialog(self, dialog: Dialog) -> object: Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`Dialog` + :type dialog: :class:`botbuilder.dialogs.Dialog` :return self: The updated :class:`ComponentDialog` :rtype self: :class:`ComponentDialog` """ @@ -198,7 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The :class:`Dialog`; or None if there is not a match for the ID. + :return: The :class:`botbuilder.dialogs.Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) @@ -212,13 +212,13 @@ async def on_begin_dialog( If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. - By default, this calls the :meth:`Dialog.begin_dialog()` method of the component + By default, this calls the :meth:`botbuilder.dialogs.Dialog.begin_dialog()` method of the component dialog's initial dialog. Override this method in a derived class to implement interrupt logic. - :param inner_dc: The inner :class:`DialogContext` for the current turn of conversation. - :type inner_dc: :class:`DialogContext` + :param inner_dc: The inner :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. + :type inner_dc: :class:`botbuilder.dialogs.DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object """ @@ -228,8 +228,8 @@ async def on_continue_dialog(self, inner_dc: DialogContext) -> DialogTurnResult: """ Called when the dialog is continued, where it is the active dialog and the user replies with a new activity. - :param inner_dc: The inner :class:`DialogContext` for the current turn of conversation. - :type inner_dc: :class:`DialogContext` + :param inner_dc: The inner :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. + :type inner_dc: :class:`botbuilder.dialogs.DialogContext` """ return await inner_dc.continue_dialog() @@ -242,9 +242,9 @@ async def on_end_dialog( # pylint: disable=unused-argument :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. - :type reason: :class:`DialogReason` + :type reason: :class:`botbuilder.dialogs.DialogReason` """ return @@ -253,9 +253,9 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument ) -> None: """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. - :type turn_context: :class:`DialogInstance` + :type turn_context: :class:`botbuilder.dialogs.DialogInstance` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` """ return @@ -270,19 +270,19 @@ async def end_component( turn was processed by the dialog. In general, the parent context is the dialog or bot turn handler that started the dialog. - If the parent is a dialog, the stack calls the parent's :meth:`Dialog.resume_dialog()` method + If the parent is a dialog, the stack calls the parent's :meth:`botbuilder.dialogs.Dialog.resume_dialog()` method to return a result to the parent dialog. If the parent dialog does not implement - :meth:`Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next + :meth:`botbuilder.dialogs.Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next parent context, if one exists. - The returned :class:`DialogTurnResult`contains the return value in its - :class:`DialogTurnResult.result` property. + The returned :class:`botbuilder.dialogs.DialogTurnResult`contains the return value in its + :var:`botbuilder.dialogs.DialogTurnResult.result` property. - :param outer_dc: The parent :class:`DialogContext` for the current turn of conversation. - :type outer_dc: :class:`DialogContext` + :param outer_dc: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. + :type outer_dc: :class:`botbuilder.dialogs.DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return : Value to return. - :rtype: :var:`DialogTurnResult.result` + :rtype: :var:`botbuilder.dialogs.DialogTurnResult.result` """ return await outer_dc.end_dialog(result) From 0bfa431ed508a0e9f25a87b1bb4488c2b11332dd Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 13:42:32 -0800 Subject: [PATCH 06/33] Revert "Update component_dialog.py" This reverts commit 06130a345156209195b89cc29f4a3df593c09094. --- .../botbuilder/dialogs/component_dialog.py | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index c6887abfb..1fb054ce9 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -88,14 +88,14 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu contain a return value. If this method is *not* overriden the component dialog calls the - :meth:`botbuilder.dialogs.DialogContext.continue_dialog` method on it's inner dialog + :meth:`DialogContext.continue_dialog` method on it's inner dialog context. If the inner dialog stack is empty, the component dialog ends, - and if a :var:`botbuilder.dialogs.DialogTurnResult.result` is available, the component dialog + and if a :class:`DialogTurnResult.result` is available, the component dialog uses that as it's return value. - :param dialog_context: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`botbuilder.dialogs.DialogContext` + :param dialog_context: The parent :class:`DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`DialogContext` :return: Signals the end of the turn :rtype: :var:`Dialog.end_of_turn` """ @@ -126,8 +126,8 @@ async def resume_dialog( To avoid the container prematurely ending we need to implement this method and simply ask our inner dialog stack to re-prompt. - :param dialog_context: The :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`botbuilder.dialogs.DialogContext` + :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` :param result: Optional, value returned from the dialog that was called. @@ -148,7 +148,7 @@ async def reprompt_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information for this dialog. - :type instance: :class:`botbuilder.dialogs.DialogInstance` + :type instance: :class:`DialogInstance` """ # Delegate to inner dialog. dialog_state = instance.state[self.persisted_dialog_state] @@ -167,9 +167,9 @@ async def end_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`botbuilder.dialogs.DialogInstance` + :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. - :type reason: :class:`botbuilder.dialogs.DialogReason` + :type reason: :class:`DialogReason` """ # Forward cancel to inner dialog if reason == DialogReason.CancelCalled: @@ -183,7 +183,7 @@ def add_dialog(self, dialog: Dialog) -> object: Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`botbuilder.dialogs.Dialog` + :type dialog: :class:`Dialog` :return self: The updated :class:`ComponentDialog` :rtype self: :class:`ComponentDialog` """ @@ -198,7 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The :class:`botbuilder.dialogs.Dialog`; or None if there is not a match for the ID. + :return: The :class:`Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) @@ -212,13 +212,13 @@ async def on_begin_dialog( If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. - By default, this calls the :meth:`botbuilder.dialogs.Dialog.begin_dialog()` method of the component + By default, this calls the :meth:`Dialog.begin_dialog()` method of the component dialog's initial dialog. Override this method in a derived class to implement interrupt logic. - :param inner_dc: The inner :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. - :type inner_dc: :class:`botbuilder.dialogs.DialogContext` + :param inner_dc: The inner :class:`DialogContext` for the current turn of conversation. + :type inner_dc: :class:`DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object """ @@ -228,8 +228,8 @@ async def on_continue_dialog(self, inner_dc: DialogContext) -> DialogTurnResult: """ Called when the dialog is continued, where it is the active dialog and the user replies with a new activity. - :param inner_dc: The inner :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. - :type inner_dc: :class:`botbuilder.dialogs.DialogContext` + :param inner_dc: The inner :class:`DialogContext` for the current turn of conversation. + :type inner_dc: :class:`DialogContext` """ return await inner_dc.continue_dialog() @@ -242,9 +242,9 @@ async def on_end_dialog( # pylint: disable=unused-argument :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`botbuilder.dialogs.DialogInstance` + :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. - :type reason: :class:`botbuilder.dialogs.DialogReason` + :type reason: :class:`DialogReason` """ return @@ -253,9 +253,9 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument ) -> None: """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. - :type turn_context: :class:`botbuilder.dialogs.DialogInstance` + :type turn_context: :class:`DialogInstance` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`botbuilder.dialogs.DialogInstance` + :type instance: :class:`DialogInstance` """ return @@ -270,19 +270,19 @@ async def end_component( turn was processed by the dialog. In general, the parent context is the dialog or bot turn handler that started the dialog. - If the parent is a dialog, the stack calls the parent's :meth:`botbuilder.dialogs.Dialog.resume_dialog()` method + If the parent is a dialog, the stack calls the parent's :meth:`Dialog.resume_dialog()` method to return a result to the parent dialog. If the parent dialog does not implement - :meth:`botbuilder.dialogs.Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next + :meth:`Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next parent context, if one exists. - The returned :class:`botbuilder.dialogs.DialogTurnResult`contains the return value in its - :var:`botbuilder.dialogs.DialogTurnResult.result` property. + The returned :class:`DialogTurnResult`contains the return value in its + :class:`DialogTurnResult.result` property. - :param outer_dc: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. - :type outer_dc: :class:`botbuilder.dialogs.DialogContext` + :param outer_dc: The parent :class:`DialogContext` for the current turn of conversation. + :type outer_dc: :class:`DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return : Value to return. - :rtype: :var:`botbuilder.dialogs.DialogTurnResult.result` + :rtype: :var:`DialogTurnResult.result` """ return await outer_dc.end_dialog(result) From aba000a7dc00e48ff0b6261c893e3b00e5261665 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 13:49:02 -0800 Subject: [PATCH 07/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 1fb054ce9..bf7f480b8 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -283,6 +283,6 @@ async def end_component( :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return : Value to return. - :rtype: :var:`DialogTurnResult.result` + :rtype: :var:`botbuilder.dialogs.DialogTurnResult.result` """ return await outer_dc.end_dialog(result) From f6e73bd41c137f7cfd449d6f873262d320c330f2 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 13:57:22 -0800 Subject: [PATCH 08/33] Update dialog_turn_result.py --- .../botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py index 4dcc39e55..466cfac0f 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py @@ -12,7 +12,7 @@ class DialogTurnResult: def __init__(self, status: DialogTurnStatus, result: object = None): """ :param status: The current status of the stack. - :type status: :class:`DialogTurnStatus` + :type status: :class:`botbuilder.dialogs.DialogTurnStatus` :param result: The result returned by a dialog that was just ended. :type result: object """ From 00c49bd1ab8477845856e5a23a3a4f6ab6a9f85b Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:08:38 -0800 Subject: [PATCH 09/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index bf7f480b8..0d5d54910 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -90,7 +90,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu If this method is *not* overriden the component dialog calls the :meth:`DialogContext.continue_dialog` method on it's inner dialog context. If the inner dialog stack is empty, the component dialog ends, - and if a :class:`DialogTurnResult.result` is available, the component dialog + and if a :var:`botbuilder.dialogs.DialogTurnResult.result` is available, the component dialog uses that as it's return value. @@ -270,16 +270,16 @@ async def end_component( turn was processed by the dialog. In general, the parent context is the dialog or bot turn handler that started the dialog. - If the parent is a dialog, the stack calls the parent's :meth:`Dialog.resume_dialog()` method + If the parent is a dialog, the stack calls the parent's :meth:`botbuilder.dialogs.Dialog.resume_dialog()` method to return a result to the parent dialog. If the parent dialog does not implement - :meth:`Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next + :meth:`botbuilder.dialogs.Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next parent context, if one exists. - The returned :class:`DialogTurnResult`contains the return value in its - :class:`DialogTurnResult.result` property. + The returned :class:`botbuilder.dialogs.DialogTurnResult` contains the return value in its + :var:`botbuilder.dialogs.DialogTurnResult.result` property. - :param outer_dc: The parent :class:`DialogContext` for the current turn of conversation. - :type outer_dc: :class:`DialogContext` + :param outer_dc: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. + :type outer_dc: :class:`botbuilder.dialogs.DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return : Value to return. From 00bca73e215a8063f8662ef7cb046bd69306a57b Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:09:48 -0800 Subject: [PATCH 10/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 0d5d54910..4e693cfd2 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -253,9 +253,9 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument ) -> None: """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. - :type turn_context: :class:`DialogInstance` + :type turn_context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.core.DialogInstance` """ return From d96ee5e1fbb2a1c0a691abc2b3c3196b27a5f8f9 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:17:49 -0800 Subject: [PATCH 11/33] Revert "Update component_dialog.py" This reverts commit 00bca73e215a8063f8662ef7cb046bd69306a57b. --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 4e693cfd2..0d5d54910 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -253,9 +253,9 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument ) -> None: """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. - :type turn_context: :class:`botbuilder.core.TurnContext` + :type turn_context: :class:`DialogInstance` :param instance: State information associated with the instance of this component dialog. - :type instance: :class:`botbuilder.core.DialogInstance` + :type instance: :class:`DialogInstance` """ return From daf2aaa6d02b1e5b804d8c8deee11fb82fea5654 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:19:42 -0800 Subject: [PATCH 12/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 0d5d54910..e5f07a365 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -180,10 +180,10 @@ async def end_dialog( def add_dialog(self, dialog: Dialog) -> object: """ - Adds a :class:`Dialog` to the component dialog and returns the updated component. + Adds a :class:`botbuilder.dialogs.Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`Dialog` + :type dialog: :class:`botbuilder.dialogs.Dialog` :return self: The updated :class:`ComponentDialog` :rtype self: :class:`ComponentDialog` """ @@ -198,7 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The :class:`Dialog`; or None if there is not a match for the ID. + :return: The :class:`botbuilder.dialogs.Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) From 7955508b7704b1b25431d77ec053f8a00fed0cc5 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:23:03 -0800 Subject: [PATCH 13/33] Revert "Update component_dialog.py" This reverts commit daf2aaa6d02b1e5b804d8c8deee11fb82fea5654. --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index e5f07a365..0d5d54910 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -180,10 +180,10 @@ async def end_dialog( def add_dialog(self, dialog: Dialog) -> object: """ - Adds a :class:`botbuilder.dialogs.Dialog` to the component dialog and returns the updated component. + Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`botbuilder.dialogs.Dialog` + :type dialog: :class:`Dialog` :return self: The updated :class:`ComponentDialog` :rtype self: :class:`ComponentDialog` """ @@ -198,7 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The :class:`botbuilder.dialogs.Dialog`; or None if there is not a match for the ID. + :return: The :class:`Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) From accfbc178ff4937efd736a77e985a3385d6a0cbb Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:25:00 -0800 Subject: [PATCH 14/33] Revert "Revert "Update component_dialog.py"" This reverts commit 7955508b7704b1b25431d77ec053f8a00fed0cc5. --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 0d5d54910..e5f07a365 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -180,10 +180,10 @@ async def end_dialog( def add_dialog(self, dialog: Dialog) -> object: """ - Adds a :class:`Dialog` to the component dialog and returns the updated component. + Adds a :class:`botbuilder.dialogs.Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`Dialog` + :type dialog: :class:`botbuilder.dialogs.Dialog` :return self: The updated :class:`ComponentDialog` :rtype self: :class:`ComponentDialog` """ @@ -198,7 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The :class:`Dialog`; or None if there is not a match for the ID. + :return: The :class:`botbuilder.dialogs.Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) From 4d6251c194723ebc20fb82bb66a6c584431591f1 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 14:38:24 -0800 Subject: [PATCH 15/33] Revert "Revert "Revert "Update component_dialog.py""" This reverts commit accfbc178ff4937efd736a77e985a3385d6a0cbb. --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index e5f07a365..0d5d54910 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -180,10 +180,10 @@ async def end_dialog( def add_dialog(self, dialog: Dialog) -> object: """ - Adds a :class:`botbuilder.dialogs.Dialog` to the component dialog and returns the updated component. + Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`botbuilder.dialogs.Dialog` + :type dialog: :class:`Dialog` :return self: The updated :class:`ComponentDialog` :rtype self: :class:`ComponentDialog` """ @@ -198,7 +198,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :type dialog_id: str - :return: The :class:`botbuilder.dialogs.Dialog`; or None if there is not a match for the ID. + :return: The :class:`Dialog`; or None if there is not a match for the ID. """ return self._dialogs.find(dialog_id) From c8b5c46fd46961a637e389479a966a22ca2cc4ba Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 15:03:08 -0800 Subject: [PATCH 16/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 0d5d54910..c98de80f9 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -15,9 +15,9 @@ class ComponentDialog(Dialog): """ - A :class:`botbuilder.dialogs.Dialog` that is composed of other dialogs + A :class:`Dialog` that is composed of other dialogs - A component dialog has an inner :class:`botbuilder.dialogs.DialogSet` :class:`botbuilder.dialogs.DialogContext`, + A component dialog has an inner :class:`DialogSet` :class:`DialogContext`, which provides an inner dialog stack that is hidden from the parent dialog. :var persisted_dialog state: @@ -52,12 +52,12 @@ async def begin_dialog( If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. - :param dialog_context: The :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`botbuilder.dialogs.DialogContext` + :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object :return: Signals the end of the turn - :rtype: :var:`botbuilder.dialogs.Dialog.end_of_turn` + :rtype: :class:`Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -90,14 +90,14 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu If this method is *not* overriden the component dialog calls the :meth:`DialogContext.continue_dialog` method on it's inner dialog context. If the inner dialog stack is empty, the component dialog ends, - and if a :var:`botbuilder.dialogs.DialogTurnResult.result` is available, the component dialog + and if a :class:`DialogTurnResult.result` is available, the component dialog uses that as it's return value. :param dialog_context: The parent :class:`DialogContext` for the current turn of the conversation. :type dialog_context: :class:`DialogContext` :return: Signals the end of the turn - :rtype: :var:`Dialog.end_of_turn` + :rtype: :class:`Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -130,10 +130,11 @@ async def resume_dialog( :type dialog_context: :class:`DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` - :param result: Optional, value returned from the dialog that was called. + :param result: Optional, value returned from the dialog that was called. The type of the + value returned is dependent on the child dialog. :type result: object - :return Dialog.end_of_turn: Signals the end of the turn - :rtype Dialog.end_of_turn: :class:`Dialog.end_of_turn` + :return: Signals the end of the turn + :rtype: :class:`Dialog.end_of_turn` """ await self.reprompt_dialog(dialog_context.context, dialog_context.active_dialog) @@ -166,7 +167,8 @@ async def end_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` - :param instance: State information associated with the instance of this component dialog. + :param instance: State information associated with the instance of this component dialog + on its parent's dialog stack. :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` @@ -183,9 +185,8 @@ def add_dialog(self, dialog: Dialog) -> object: Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :type dialog: :class:`Dialog` - :return self: The updated :class:`ComponentDialog` - :rtype self: :class:`ComponentDialog` + :return: The updated :class:`ComponentDialog` + :rtype: :class:`ComponentDialog` """ self._dialogs.add(dialog) if not self.initial_dialog_id: @@ -197,8 +198,8 @@ def find_dialog(self, dialog_id: str) -> Dialog: Finds a dialog by ID. :param dialog_id: The dialog to add. - :type dialog_id: str - :return: The :class:`Dialog`; or None if there is not a match for the ID. + :return: The dialog; or None if there is not a match for the ID. + :rtype: :class:Dialog """ return self._dialogs.find(dialog_id) @@ -241,7 +242,8 @@ async def on_end_dialog( # pylint: disable=unused-argument :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` - :param instance: State information associated with the instance of this component dialog. + :param instance: State information associated with the instance of this component dialog on + its parent's dialog stack. :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` @@ -254,7 +256,8 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`DialogInstance` - :param instance: State information associated with the instance of this component dialog. + :param instance: State information associated with the instance of this component dialog + on its parent's dialog stack. :type instance: :class:`DialogInstance` """ return @@ -270,19 +273,19 @@ async def end_component( turn was processed by the dialog. In general, the parent context is the dialog or bot turn handler that started the dialog. - If the parent is a dialog, the stack calls the parent's :meth:`botbuilder.dialogs.Dialog.resume_dialog()` method + If the parent is a dialog, the stack calls the parent's :meth:`Dialog.resume_dialog()` method to return a result to the parent dialog. If the parent dialog does not implement - :meth:`botbuilder.dialogs.Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next + :meth:`Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next parent context, if one exists. - The returned :class:`botbuilder.dialogs.DialogTurnResult` contains the return value in its - :var:`botbuilder.dialogs.DialogTurnResult.result` property. + The returned :class:`DialogTurnResult`contains the return value in its + :class:`DialogTurnResult.result` property. - :param outer_dc: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of conversation. - :type outer_dc: :class:`botbuilder.dialogs.DialogContext` + :param outer_dc: The parent class:`DialogContext` for the current turn of conversation. + :type outer_dc: class:`DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object - :return : Value to return. - :rtype: :var:`botbuilder.dialogs.DialogTurnResult.result` + :return: Value to return. + :rtype: :class:`DialogTurnResult.result` """ return await outer_dc.end_dialog(result) From 9a1e0ba934d338d0cf61dfaa261aba7b9b1fee6f Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 15:11:39 -0800 Subject: [PATCH 17/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index c98de80f9..89089c389 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -15,7 +15,7 @@ class ComponentDialog(Dialog): """ - A :class:`Dialog` that is composed of other dialogs + A :class:`botbuilder.dialogs.Dialog` that is composed of other dialogs A component dialog has an inner :class:`DialogSet` :class:`DialogContext`, which provides an inner dialog stack that is hidden from the parent dialog. From cc37db7852d544732491b359b60ddd3eb385503f Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 15:25:50 -0800 Subject: [PATCH 18/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 89089c389..0a7cc8d08 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -17,9 +17,6 @@ class ComponentDialog(Dialog): """ A :class:`botbuilder.dialogs.Dialog` that is composed of other dialogs - A component dialog has an inner :class:`DialogSet` :class:`DialogContext`, - which provides an inner dialog stack that is hidden from the parent dialog. - :var persisted_dialog state: :vartype persisted_dialog_state: str """ From 85b1fbeeeda3306615795aa8c7d2dcdbb4cfbc13 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 16:03:10 -0800 Subject: [PATCH 19/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 0a7cc8d08..03f9a5a95 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -49,12 +49,12 @@ async def begin_dialog( If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. - :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") From f68c940c2ab5fef217a15730823458dbcc1c44f9 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:02:20 -0800 Subject: [PATCH 20/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 03f9a5a95..9415a1301 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -85,14 +85,14 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu contain a return value. If this method is *not* overriden the component dialog calls the - :meth:`DialogContext.continue_dialog` method on it's inner dialog + :meth:`botbuilder.dialogs.DialogContext.continue_dialog` method on it's inner dialog context. If the inner dialog stack is empty, the component dialog ends, - and if a :class:`DialogTurnResult.result` is available, the component dialog + and if a :var:`botbuilder.dialogs.DialogTurnResult.result` is available, the component dialog uses that as it's return value. - :param dialog_context: The parent :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn :rtype: :class:`Dialog.end_of_turn` """ From 791700014ffa471e07901d6979189cfd4ed2307a Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:09:19 -0800 Subject: [PATCH 21/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 9415a1301..aaa468ba2 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -94,7 +94,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu :param dialog_context: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -123,8 +123,8 @@ async def resume_dialog( To avoid the container prematurely ending we need to implement this method and simply ask our inner dialog stack to re-prompt. - :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The dialog context for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` :param result: Optional, value returned from the dialog that was called. The type of the From dddc5c258e01248f3a0e625f783b5c63620f3c8d Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:14:23 -0800 Subject: [PATCH 22/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index aaa468ba2..4e0b5acbb 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -91,7 +91,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu uses that as it's return value. - :param dialog_context: The parent :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. + :param dialog_context: The parent dialog context for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` From 3c20a540910afdb129cc5b59245e751fe225d472 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:14:38 -0800 Subject: [PATCH 23/33] Revert "Update component_dialog.py" This reverts commit 791700014ffa471e07901d6979189cfd4ed2307a. --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 4e0b5acbb..c8f3090ce 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -94,7 +94,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu :param dialog_context: The parent dialog context for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn - :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` + :rtype: :class:`Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -123,8 +123,8 @@ async def resume_dialog( To avoid the container prematurely ending we need to implement this method and simply ask our inner dialog stack to re-prompt. - :param dialog_context: The dialog context for the current turn of the conversation. - :type dialog_context: :class:`botbuilder.dialogs.DialogContext` + :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. + :type dialog_context: :class:`DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` :param result: Optional, value returned from the dialog that was called. The type of the From 0517a146df6f8c8402a512e2993f80535b9a3346 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:21:58 -0800 Subject: [PATCH 24/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index c8f3090ce..a2ffcf34a 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -283,6 +283,6 @@ async def end_component( :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return: Value to return. - :rtype: :class:`DialogTurnResult.result` + :rtype: :var:`botbuilder.dialogs.DialogTurnResult.result` """ return await outer_dc.end_dialog(result) From 0462d069cfa20e26226a99e8bccbbd128295b9be Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:27:56 -0800 Subject: [PATCH 25/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index a2ffcf34a..541397f8e 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -275,8 +275,8 @@ async def end_component( :meth:`Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next parent context, if one exists. - The returned :class:`DialogTurnResult`contains the return value in its - :class:`DialogTurnResult.result` property. + The returned :class:`botbuilder.dialogs.DialogTurnResult`contains the return value in its + :var:`botbuilder.dialogs.DialogTurnResult.result` property. :param outer_dc: The parent class:`DialogContext` for the current turn of conversation. :type outer_dc: class:`DialogContext` From 94563db87a0bcae9d2a238d0c94322aba7572bde Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:40:54 -0800 Subject: [PATCH 26/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 541397f8e..c4e4c1bb8 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -94,7 +94,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu :param dialog_context: The parent dialog context for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -131,7 +131,7 @@ async def resume_dialog( value returned is dependent on the child dialog. :type result: object :return: Signals the end of the turn - :rtype: :class:`Dialog.end_of_turn` + :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ await self.reprompt_dialog(dialog_context.context, dialog_context.active_dialog) @@ -196,7 +196,7 @@ def find_dialog(self, dialog_id: str) -> Dialog: :param dialog_id: The dialog to add. :return: The dialog; or None if there is not a match for the ID. - :rtype: :class:Dialog + :rtype: :class:`botbuilder.dialogs.Dialog` """ return self._dialogs.find(dialog_id) From 8cf5ff4cbc2c99178eab4c8bda406e4297b40620 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 17:54:14 -0800 Subject: [PATCH 27/33] Update component_dialog.py --- .../botbuilder-dialogs/botbuilder/dialogs/component_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index c4e4c1bb8..9a4e7c1c9 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -278,8 +278,8 @@ async def end_component( The returned :class:`botbuilder.dialogs.DialogTurnResult`contains the return value in its :var:`botbuilder.dialogs.DialogTurnResult.result` property. - :param outer_dc: The parent class:`DialogContext` for the current turn of conversation. - :type outer_dc: class:`DialogContext` + :param outer_dc: The parent dialog context for the current turn of conversation. + :type outer_dc: class:`botbuilder.dialogs.DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return: Value to return. From 2d750f4d2efee1fc6016dd1bff0a1972036e6e93 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 18:07:10 -0800 Subject: [PATCH 28/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 9a4e7c1c9..d1425386f 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -269,15 +269,6 @@ async def end_component( If the task is successful, the result indicates that the dialog ended after the turn was processed by the dialog. - In general, the parent context is the dialog or bot turn handler that started the dialog. - If the parent is a dialog, the stack calls the parent's :meth:`Dialog.resume_dialog()` method - to return a result to the parent dialog. If the parent dialog does not implement - :meth:`Dialog.resume_dialog()`, then the parent will end, too, and the result is passed to the next - parent context, if one exists. - - The returned :class:`botbuilder.dialogs.DialogTurnResult`contains the return value in its - :var:`botbuilder.dialogs.DialogTurnResult.result` property. - :param outer_dc: The parent dialog context for the current turn of conversation. :type outer_dc: class:`botbuilder.dialogs.DialogContext` :param result: Optional, value to return from the dialog component to the parent context. From f1e5a45b11475cbf988aafda3a4a64982ef85c41 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 18:17:02 -0800 Subject: [PATCH 29/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index d1425386f..70bf80208 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -127,8 +127,7 @@ async def resume_dialog( :type dialog_context: :class:`DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`DialogReason` - :param result: Optional, value returned from the dialog that was called. The type of the - value returned is dependent on the child dialog. + :param result: Optional, value returned from the dialog that was called. :type result: object :return: Signals the end of the turn :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` @@ -252,10 +251,10 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument ) -> None: """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. - :type turn_context: :class:`DialogInstance` + :type turn_context: :class:`botbuilder.dialogs.DialogInstance` :param instance: State information associated with the instance of this component dialog on its parent's dialog stack. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` """ return From 1c520d66404d4cee81aeb33297653e071002841e Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 18:21:00 -0800 Subject: [PATCH 30/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 70bf80208..e4e54865d 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -163,7 +163,7 @@ async def end_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` - :param instance: State information associated with the instance of this component dialog + :param instance: State information associated with the instance of this component dialog. on its parent's dialog stack. :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. @@ -238,8 +238,7 @@ async def on_end_dialog( # pylint: disable=unused-argument :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` - :param instance: State information associated with the instance of this component dialog on - its parent's dialog stack. + :param instance: State information associated with the inner dialog stack of this component dialog. :type instance: :class:`DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` @@ -252,8 +251,7 @@ async def on_reprompt_dialog( # pylint: disable=unused-argument """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.dialogs.DialogInstance` - :param instance: State information associated with the instance of this component dialog - on its parent's dialog stack. + :param instance: State information associated with the inner dialog stack of this component dialog. :type instance: :class:`botbuilder.dialogs.DialogInstance` """ return From 88206326d2e739fb9764a43af1664ed4b3d6aab3 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 18:27:44 -0800 Subject: [PATCH 31/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index e4e54865d..78d208daf 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -145,7 +145,7 @@ async def reprompt_dialog( :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information for this dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` """ # Delegate to inner dialog. dialog_state = instance.state[self.persisted_dialog_state] @@ -165,7 +165,7 @@ async def end_dialog( :type context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. on its parent's dialog stack. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` """ @@ -239,7 +239,7 @@ async def on_end_dialog( # pylint: disable=unused-argument :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the inner dialog stack of this component dialog. - :type instance: :class:`DialogInstance` + :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`DialogReason` """ From 44a7da09c1dafc64239117a8cd97d769d9ff628f Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 18:28:34 -0800 Subject: [PATCH 32/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 78d208daf..2e41db1a9 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -126,7 +126,7 @@ async def resume_dialog( :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. :type dialog_context: :class:`DialogContext` :param reason: Reason why the dialog resumed. - :type reason: :class:`DialogReason` + :type reason: :class:`botbuilder.dialogs.DialogReason` :param result: Optional, value returned from the dialog that was called. :type result: object :return: Signals the end of the turn @@ -167,7 +167,7 @@ async def end_dialog( on its parent's dialog stack. :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. - :type reason: :class:`DialogReason` + :type reason: :class:`botbuilder.dialogs.DialogReason` """ # Forward cancel to inner dialog if reason == DialogReason.CancelCalled: @@ -241,7 +241,7 @@ async def on_end_dialog( # pylint: disable=unused-argument :param instance: State information associated with the inner dialog stack of this component dialog. :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. - :type reason: :class:`DialogReason` + :type reason: :class:`botbuilder.dialogs.DialogReason` """ return From 93085ad00588bb525f8514883b69589c400c474f Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 10 Feb 2020 18:36:26 -0800 Subject: [PATCH 33/33] Update component_dialog.py --- .../botbuilder/dialogs/component_dialog.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py index 2e41db1a9..bda4b711f 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py @@ -94,7 +94,7 @@ async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResu :param dialog_context: The parent dialog context for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn - :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` + :rtype: :var:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") @@ -123,8 +123,8 @@ async def resume_dialog( To avoid the container prematurely ending we need to implement this method and simply ask our inner dialog stack to re-prompt. - :param dialog_context: The :class:`DialogContext` for the current turn of the conversation. - :type dialog_context: :class:`DialogContext` + :param dialog_context: The dialog context for the current turn of the conversation. + :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`botbuilder.dialogs.DialogReason` :param result: Optional, value returned from the dialog that was called. @@ -181,7 +181,7 @@ def add_dialog(self, dialog: Dialog) -> object: Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. - :return: The updated :class:`ComponentDialog` + :return: The updated :class:`ComponentDialog`. :rtype: :class:`ComponentDialog` """ self._dialogs.add(dialog) @@ -209,13 +209,13 @@ async def on_begin_dialog( If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. - By default, this calls the :meth:`Dialog.begin_dialog()` method of the component - dialog's initial dialog. + By default, this calls the :meth:`botbuilder.dialogs.Dialog.begin_dialog()` + method of the component dialog's initial dialog. Override this method in a derived class to implement interrupt logic. - :param inner_dc: The inner :class:`DialogContext` for the current turn of conversation. - :type inner_dc: :class:`DialogContext` + :param inner_dc: The inner dialog context for the current turn of conversation. + :type inner_dc: :class:`botbuilder.dialogs.DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object """ @@ -225,8 +225,8 @@ async def on_continue_dialog(self, inner_dc: DialogContext) -> DialogTurnResult: """ Called when the dialog is continued, where it is the active dialog and the user replies with a new activity. - :param inner_dc: The inner :class:`DialogContext` for the current turn of conversation. - :type inner_dc: :class:`DialogContext` + :param inner_dc: The inner dialog context for the current turn of conversation. + :type inner_dc: :class:`botbuilder.dialogs.DialogContext` """ return await inner_dc.continue_dialog()