Skip to content

Commit

Permalink
[BUG] Allow None value for UserSelectMenu placeholders and others (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklambourne authored Aug 18, 2023
1 parent 719ba91 commit 87527c2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 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 = "0.9.10"
version = "0.9.11"
description = "Python wrapper for the Slack Blocks API"
authors = [
"Nicholas Lambourne <[email protected]>",
Expand Down
31 changes: 23 additions & 8 deletions slackblocks/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def __init__(
self.dispatch_action_config = dispatch_action_config
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder, max_length=150, force_plaintext=True, allow_none=True
)

def _resolve(self):
Expand Down Expand Up @@ -759,7 +759,7 @@ def __init__(
self.confirm = confirm
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder, max_length=150, force_plaintext=True, allow_none=True
)

def _resolve(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -801,7 +801,10 @@ def __init__(
self.confirm = confirm
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder,
max_length=150,
force_plaintext=True,
allow_none=True,
)

def _resolve(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -835,7 +838,7 @@ def __init__(
self.confirm = confirm
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder, max_length=150, force_plaintext=True, allow_none=True
)

def _resolve(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -873,7 +876,10 @@ def __init__(
self.filter = filter
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder,
max_length=150,
force_plaintext=True,
allow_none=True,
)

def _resolve(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -915,7 +921,10 @@ def __init__(
self.response_url_enabled = response_url_enabled
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder,
max_length=150,
force_plaintext=True,
allow_none=True,
)

def _resolve(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -950,7 +959,10 @@ def __init__(
self.confirm = confirm
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, max_length=150, force_plaintext=True
placeholder,
max_length=150,
force_plaintext=True,
allow_none=True,
)
self.timezone = timezone

Expand Down Expand Up @@ -985,7 +997,10 @@ def __init__(
self.dispatch_action_config = dispatch_action_config
self.focus_on_load = focus_on_load
self.placeholder = Text.to_text(
placeholder, force_plaintext=True, max_length=150, allow_none=True
placeholder,
force_plaintext=True,
max_length=150,
allow_none=True,
)

def _resolve(self) -> Dict[str, Any]:
Expand Down

0 comments on commit 87527c2

Please sign in to comment.