From 2034c6b7ad5b5b80c88479d7b3fc7b7b33a5fe1e Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Mon, 20 Jan 2020 11:19:39 -0800 Subject: [PATCH 1/3] emolsh/apu-ref-docs-dialogstate --- .../botbuilder/dialogs/dialog_state.py | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py index 278e6b14d..ba557631a 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py @@ -4,9 +4,18 @@ from typing import List from .dialog_instance import DialogInstance - class DialogState: + """ + Contains state information for the dialog stack. + """ def __init__(self, stack: List[DialogInstance] = None): + """ + Initializes a new instance of the `DialogState` class. + .. remarks:: + The new instance is created with an empty dialog stack. + :param stack: The state information to initialize the stack with. + :type stack: List + """ if stack is None: self._dialog_stack = [] else: @@ -14,9 +23,22 @@ def __init__(self, stack: List[DialogInstance] = None): @property def dialog_stack(self): + """ + Initializes a new instance of the `DialogState` class. + .. remarks:: + The new instance has a dialog stack that is populated using the information + :return: The state information to initialize the stack with. + :rtype: List + """ return self._dialog_stack def __str__(self): + """ + Gets or sets the state information for a dialog stack. + + :return: State information for a dialog stack + :rtype: str + """ if not self._dialog_stack: return "dialog stack empty!" return " ".join(map(str, self._dialog_stack)) From c1cb806e886aa3f16e91a2b9c2489cccc38a65e9 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Wed, 22 Jan 2020 15:39:26 -0800 Subject: [PATCH 2/3] Updated formatting Not sure how to document method on line 36 --- .../botbuilder/dialogs/dialog_state.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py index ba557631a..42bf51fc2 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py @@ -11,10 +11,12 @@ class DialogState: def __init__(self, stack: List[DialogInstance] = None): """ Initializes a new instance of the `DialogState` class. + .. remarks:: The new instance is created with an empty dialog stack. + :param stack: The state information to initialize the stack with. - :type stack: List + :type stack: List[:class:`DialogInstance`] """ if stack is None: self._dialog_stack = [] @@ -24,9 +26,8 @@ def __init__(self, stack: List[DialogInstance] = None): @property def dialog_stack(self): """ - Initializes a new instance of the `DialogState` class. - .. remarks:: - The new instance has a dialog stack that is populated using the information + Initializes a new instance of the :class:`DialogState` class. + :return: The state information to initialize the stack with. :rtype: List """ @@ -34,9 +35,8 @@ def dialog_stack(self): def __str__(self): """ - Gets or sets the state information for a dialog stack. - - :return: State information for a dialog stack + ? + :return: :rtype: str """ if not self._dialog_stack: From 9759e56d9be4c1203e64d3f226eb442b4c006079 Mon Sep 17 00:00:00 2001 From: Emily Olshefski Date: Fri, 24 Jan 2020 13:45:00 -0800 Subject: [PATCH 3/3] Fixed formatting Removed docstring for `def __str__(self)` --- .../botbuilder/dialogs/dialog_state.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py index 42bf51fc2..218caf5d0 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py @@ -10,10 +10,8 @@ class DialogState: """ def __init__(self, stack: List[DialogInstance] = None): """ - Initializes a new instance of the `DialogState` class. - - .. remarks:: - The new instance is created with an empty dialog stack. + Initializes a new instance of the :class:`DialogState` class. + The new instance is created with an empty dialog stack. :param stack: The state information to initialize the stack with. :type stack: List[:class:`DialogInstance`] @@ -34,11 +32,6 @@ def dialog_stack(self): return self._dialog_stack def __str__(self): - """ - ? - :return: - :rtype: str - """ if not self._dialog_stack: return "dialog stack empty!" return " ".join(map(str, self._dialog_stack))