From a136b9a2f93d0eebb481e78abe501c597b6d1120 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 20 Jan 2020 10:46:14 -0800 Subject: [PATCH 1/4] emolsh/api-ref-docs-dialogturnresult --- .../botbuilder/dialogs/dialog_turn_result.py | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py index e36504f8b..a3d6230ab 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py @@ -3,16 +3,41 @@ from .dialog_turn_status import DialogTurnStatus - class DialogTurnResult: + """ + Result returned to the caller of one of the various stack manipulation methods. + """ def __init__(self, status: DialogTurnStatus, result: object = None): + """ + :param status: The current status of the stack. + :type status: :class:`DialogTurnStatus` + :param result: The result returned by a dialog that was just ended. + :type result: object + """ self._status = status self._result = result - + @property def status(self): + """ + Gets or sets the current status of the stack. + + :return self._status: + :rtype self._status: :class:`DialogTurnStatus` + + """ return self._status + + """ + Final result returned by a dialog that just completed. + ..remarks: + This will only be populated in certain cases: + - The bot calls `DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately. + - The bot calls `DialogContext.continue_dialog()` and a dialog that was active ends. + :return self._result: + :rtype self._result: object + """ @property def result(self): return self._result From bef05785573e85b946f797d288ac26b03c6f1dc6 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Wed, 22 Jan 2020 15:32:25 -0800 Subject: [PATCH 2/4] Updated formatting --- .../botbuilder/dialogs/dialog_turn_result.py | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py index a3d6230ab..6a09a690e 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py @@ -6,6 +6,10 @@ class DialogTurnResult: """ Result returned to the caller of one of the various stack manipulation methods. + + ..remarks: + Use :class:`DialogContext.end_dialogAsync()` to end a :class:`Dialog` and + return a result to the calling context. """ def __init__(self, status: DialogTurnStatus, result: object = None): """ @@ -19,25 +23,25 @@ def __init__(self, status: DialogTurnStatus, result: object = None): @property def status(self): - """ - Gets or sets the current status of the stack. - - :return self._status: - :rtype self._status: :class:`DialogTurnStatus` + """ + Gets or sets the current status of the stack. - """ + :return self._status: + :rtype self._status: :class:`DialogTurnStatus` + """ return self._status + + @property + def result(self): + """ + Final result returned by a dialog that just completed. - """ - Final result returned by a dialog that just completed. - ..remarks: - This will only be populated in certain cases: - - The bot calls `DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately. - - The bot calls `DialogContext.continue_dialog()` and a dialog that was active ends. + ..remarks: + This will only be populated in certain cases: + - The bot calls `DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately. + - The bot calls `DialogContext.continue_dialog()` and a dialog that was active ends. :return self._result: :rtype self._result: object """ - @property - def result(self): return self._result From 299cec4da6bd4fb4359ece5b5e0b43325253d6b8 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Wed, 22 Jan 2020 15:33:04 -0800 Subject: [PATCH 3/4] Updated formatting --- .../botbuilder/dialogs/dialog_turn_result.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py index 6a09a690e..7e1bb4075 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py @@ -7,7 +7,7 @@ class DialogTurnResult: """ Result returned to the caller of one of the various stack manipulation methods. - ..remarks: + ..remarks:: Use :class:`DialogContext.end_dialogAsync()` to end a :class:`Dialog` and return a result to the calling context. """ @@ -36,7 +36,7 @@ def result(self): """ Final result returned by a dialog that just completed. - ..remarks: + ..remarks:: This will only be populated in certain cases: - The bot calls `DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately. - The bot calls `DialogContext.continue_dialog()` and a dialog that was active ends. From 695bd5d33c733e2730ab6e1cdd7d85f1e2dce9c5 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Fri, 24 Jan 2020 13:48:47 -0800 Subject: [PATCH 4/4] Fixed formatting --- .../botbuilder/dialogs/dialog_turn_result.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py index 7e1bb4075..d02ecaa4a 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_turn_result.py @@ -6,10 +6,9 @@ class DialogTurnResult: """ Result returned to the caller of one of the various stack manipulation methods. - - ..remarks:: - Use :class:`DialogContext.end_dialogAsync()` to end a :class:`Dialog` and - return a result to the calling context. + + Use :meth:`DialogContext.end_dialogAsync()` to end a :class:`Dialog` and + return a result to the calling context. """ def __init__(self, status: DialogTurnStatus, result: object = None): """ @@ -36,12 +35,12 @@ def result(self): """ Final result returned by a dialog that just completed. - ..remarks:: - This will only be populated in certain cases: - - The bot calls `DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately. - - The bot calls `DialogContext.continue_dialog()` and a dialog that was active ends. + .. note:: + This will only be populated in certain cases: + * The bot calls :meth:`DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately. + * The bot calls :meth:`DialogContext.continue_dialog()` and a dialog that was active ends. - :return self._result: + :return self._result: Final result returned by a dialog that just completed. :rtype self._result: object """ return self._result