Skip to content

Corrected type hint on AttachmentPrompt __init__ #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 13, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

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
from .prompt import Prompt, PromptValidatorContext
from .prompt_options import PromptOptions
from .prompt_recognizer_result import PromptRecognizerResult

Expand All @@ -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[[Attachment], bool] = None):
def __init__(
self, dialog_id: str, validator: Callable[[PromptValidatorContext], bool] = None
):
super().__init__(dialog_id, validator)

async def on_prompt(
Expand Down