Skip to content

Commit 29b5736

Browse files
authored
Merge pull request #597 from microsoft/mm-api-ref-docs-conversationstate
mm-api-ref-docs-conversationstate
2 parents ff3e688 + 6b97814 commit 29b5736

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

libraries/botbuilder-core/botbuilder/core/conversation_state.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,35 @@
77

88

99
class ConversationState(BotState):
10-
"""Conversation state
10+
"""
1111
Defines a state management object for conversation state.
12-
Extends `BootState` base class.
12+
Extends :class:`BootState` base class.
1313
1414
.. remarks::
15-
Conversation state is available in any turn in a specific conversation, regardless of user, such as in a group conversation.
15+
Conversation state is available in any turn in a specific conversation, regardless of the user, such as in a group conversation.
1616
"""
17-
1817
no_key_error_message = "ConversationState: channelId and/or conversation missing from context.activity."
1918

2019
def __init__(self, storage: Storage):
21-
""" Creates a :class:ConversationState instance
22-
Creates a new instance of the :class:ConversationState class.
20+
"""
21+
Creates a :class:`ConversationState` instance.
22+
23+
Creates a new instance of the :class:`ConversationState` class.
2324
:param storage: The storage containing the conversation state.
24-
:type storage: Storage
25+
:type storage: :class:`Storage`
2526
"""
2627
super(ConversationState, self).__init__(storage, "ConversationState")
2728

2829
def get_storage_key(self, turn_context: TurnContext) -> object:
29-
""" Get storage key
30+
"""
3031
Gets the key to use when reading and writing state to and from storage.
3132
3233
:param turn_context: The context object for this turn.
33-
:type turn_context: TurnContext
34+
:type turn_context: :class:`TurnContext`
3435
35-
:raise: `TypeError` if the `ITurnContext.Activity` for the current turn is missing
36-
:any::Schema.Activity.ChannelId or :any::Schema.Activity.Conversation information, or
37-
the conversation's :any::Schema.ConversationAccount.Id is missing.
36+
:raise: :class:`TypeError` if the :meth:`TurnContext.activity` for the current turn is missing
37+
:class:`botbuilder.schema.Activity` channelId or conversation information or the conversation's
38+
account id is missing.
3839
3940
:return: The storage key.
4041
:rtype: str
@@ -56,7 +57,7 @@ def get_storage_key(self, turn_context: TurnContext) -> object:
5657
return storage_key
5758

5859
def __raise_type_error(self, err: str = "NoneType found while expecting value"):
59-
""" Raise type error
60-
:raises: :class:TypeError This function raises exception.
60+
""" Raise type error exception
61+
:raises: :class:`TypeError`
6162
"""
6263
raise TypeError(err)

0 commit comments

Comments
 (0)