Skip to content

ContextBlock's elements argument is incorrectly typed #1095

@uroboro

Description

@uroboro

elements: Sequence[Union[dict, ImageBlock, TextObject]],

ImageBlock should be ImageElement.

Using ImageBlock will cause the Slack API to fail:

The server responded with: {'ok': False, 'error': 'cannot_parse_attachment'})

While using ImageElement will cause a mypy error:

error: List item 0 has incompatible type "ImageElement"; expected "Union[Dict[Any, Any], ImageBlock, TextObject]"

The Slack SDK version

slack-bolt==1.7.0
slack-sdk==3.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Version: 3xbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedweb-client

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions