Skip to content

Commit 1de0d2a

Browse files
authored
Fix #1127 Add more docstrings to slack_sdk.models classes (#1135)
1 parent cf22599 commit 1de0d2a

4 files changed

Lines changed: 435 additions & 14 deletions

File tree

slack_sdk/models/blocks/basic_components.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ def __init__(self, *, text: str, emoji: Optional[bool] = None):
8686
"""A plain text object, meaning markdown characters will not be parsed as
8787
formatting information.
8888
https://api.slack.com/reference/block-kit/composition-objects#text
89+
90+
Args:
91+
text (required): The text for the block. This field accepts any of the standard text formatting markup
92+
when type is mrkdwn.
93+
emoji: Indicates whether emojis in a text field should be escaped into the colon emoji format.
94+
This field is only usable when type is plain_text.
8995
"""
9096
super().__init__(text=text, type=self.type)
9197
self.emoji = emoji
@@ -113,6 +119,14 @@ def __init__(self, *, text: str, verbatim: Optional[bool] = None):
113119
"""A Markdown text object, meaning markdown characters will be parsed as
114120
formatting information.
115121
https://api.slack.com/reference/block-kit/composition-objects#text
122+
123+
Args:
124+
text (required): The text for the block. This field accepts any of the standard text formatting markup
125+
when type is mrkdwn.
126+
verbatim: When set to false (as is default) URLs will be auto-converted into links,
127+
conversation names will be link-ified, and certain mentions will be automatically parsed.
128+
Using a value of true will skip any preprocessing of this nature,
129+
although you can still include manual parsing strings. This field is only usable when type is mrkdwn.
116130
"""
117131
super().__init__(text=text, type=self.type)
118132
self.verbatim = verbatim

0 commit comments

Comments
 (0)