Skip to content

Commit

Permalink
1.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklambourne committed Nov 18, 2024
1 parent 90c31b7 commit 1c37da3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "slackblocks"
version = "1.0.11"
version = "1.0.12"
description = "Python wrapper for the Slack Blocks API"
authors = [
"Nicholas Lambourne <[email protected]>",
Expand Down
6 changes: 5 additions & 1 deletion slackblocks/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
UserSelectMenu,
NumberInput,
EmailInput,
URLInput,
)
from slackblocks.errors import InvalidUsageError
from slackblocks.objects import (
Expand Down Expand Up @@ -69,6 +70,7 @@
UserMultiSelectMenu,
RichTextInput,
EmailInput,
URLInput,
)


Expand Down Expand Up @@ -335,7 +337,9 @@ def __init__(
label, force_plaintext=True, max_length=2000, allow_none=False
)
if not isinstance(element, ALLOWED_INPUT_ELEMENTS):
raise InvalidUsageError("")
raise InvalidUsageError(
f"InputBlocks can only hold elements of type: {ALLOWED_INPUT_ELEMENTS}"
)
self.element = element
self.dispatch_action = dispatch_action
self.hint = Text.to_text(
Expand Down

0 comments on commit 1c37da3

Please sign in to comment.