77
88
99class 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