From 3d53599d206a91f2be8a701d8f2fbc42f6799ccc Mon Sep 17 00:00:00 2001 From: tracyboehrer Date: Tue, 10 Dec 2019 08:56:26 -0600 Subject: [PATCH 1/2] Corrected type hint on AttachmentPrompt __init__ --- .../botbuilder/dialogs/prompts/attachment_prompt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py index efac79c82..dc2ce8894 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py @@ -6,7 +6,7 @@ from botbuilder.schema import ActivityTypes, Attachment, InputHints from botbuilder.core import TurnContext -from .prompt import Prompt +from .prompt import Prompt, PromptValidatorContext from .prompt_options import PromptOptions from .prompt_recognizer_result import PromptRecognizerResult @@ -18,7 +18,7 @@ class AttachmentPrompt(Prompt): By default the prompt will return to the calling dialog an `[Attachment]` """ - def __init__(self, dialog_id: str, validator: Callable[[Attachment], bool] = None): + def __init__(self, dialog_id: str, validator: Callable[[PromptValidatorContext], bool] = None): super().__init__(dialog_id, validator) async def on_prompt( From cce7afee4711f688ee2de05740c7bf528f873f6a Mon Sep 17 00:00:00 2001 From: tracyboehrer Date: Wed, 11 Dec 2019 08:29:38 -0600 Subject: [PATCH 2/2] Corrected black complaints --- .../botbuilder/dialogs/prompts/attachment_prompt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py index dc2ce8894..ab2cf1736 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py +++ b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py @@ -3,7 +3,7 @@ from typing import Callable, Dict -from botbuilder.schema import ActivityTypes, Attachment, InputHints +from botbuilder.schema import ActivityTypes, InputHints from botbuilder.core import TurnContext from .prompt import Prompt, PromptValidatorContext @@ -18,7 +18,9 @@ class AttachmentPrompt(Prompt): By default the prompt will return to the calling dialog an `[Attachment]` """ - def __init__(self, dialog_id: str, validator: Callable[[PromptValidatorContext], bool] = None): + def __init__( + self, dialog_id: str, validator: Callable[[PromptValidatorContext], bool] = None + ): super().__init__(dialog_id, validator) async def on_prompt(