Skip to content

Commit 1d0fda6

Browse files
committed
version 3.33.3
1 parent 39d9704 commit 1d0fda6

File tree

4 files changed

+51
-2
lines changed

4 files changed

+51
-2
lines changed

docs/static/api-docs/slack_sdk/models/basic_objects.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ <h1 class="title">Module <code>slack_sdk.models.basic_objects</code></h1>
4040
return f&#34;&lt;slack_sdk.{self.__class__.__name__}&gt;&#34;
4141

4242

43+
# Usually, Block Kit components do not allow an empty array for a property value, but there are some exceptions.
44+
EMPTY_ALLOWED_TYPE_AND_PROPERTY_LIST = [
45+
{&#34;type&#34;: &#34;rich_text_section&#34;, &#34;property&#34;: &#34;elements&#34;},
46+
{&#34;type&#34;: &#34;rich_text_list&#34;, &#34;property&#34;: &#34;elements&#34;},
47+
{&#34;type&#34;: &#34;rich_text_preformatted&#34;, &#34;property&#34;: &#34;elements&#34;},
48+
{&#34;type&#34;: &#34;rich_text_quote&#34;, &#34;property&#34;: &#34;elements&#34;},
49+
]
50+
51+
4352
class JsonObject(BaseObject, metaclass=ABCMeta):
4453
&#34;&#34;&#34;The base class for JSON serializable class objects&#34;&#34;&#34;
4554

@@ -79,6 +88,14 @@ <h1 class="title">Module <code>slack_sdk.models.basic_objects</code></h1>
7988
value = getattr(self, key, None)
8089
if value is None:
8190
return False
91+
92+
# Usually, Block Kit components do not allow an empty array for a property value, but there are some exceptions.
93+
# The following code deals with these exceptions:
94+
type_value = getattr(self, &#34;type&#34;, None)
95+
for empty_allowed in EMPTY_ALLOWED_TYPE_AND_PROPERTY_LIST:
96+
if type_value == empty_allowed[&#34;type&#34;] and key == empty_allowed[&#34;property&#34;]:
97+
return True
98+
8299
has_len = getattr(value, &#34;__len__&#34;, None) is not None
83100
if has_len: # skipcq: PYL-R1705
84101
return len(value) &gt; 0
@@ -244,6 +261,14 @@ <h3>Ancestors</h3>
244261
value = getattr(self, key, None)
245262
if value is None:
246263
return False
264+
265+
# Usually, Block Kit components do not allow an empty array for a property value, but there are some exceptions.
266+
# The following code deals with these exceptions:
267+
type_value = getattr(self, &#34;type&#34;, None)
268+
for empty_allowed in EMPTY_ALLOWED_TYPE_AND_PROPERTY_LIST:
269+
if type_value == empty_allowed[&#34;type&#34;] and key == empty_allowed[&#34;property&#34;]:
270+
return True
271+
247272
has_len = getattr(value, &#34;__len__&#34;, None) is not None
248273
if has_len: # skipcq: PYL-R1705
249274
return len(value) &gt; 0
@@ -357,6 +382,14 @@ <h3>Methods</h3>
357382
value = getattr(self, key, None)
358383
if value is None:
359384
return False
385+
386+
# Usually, Block Kit components do not allow an empty array for a property value, but there are some exceptions.
387+
# The following code deals with these exceptions:
388+
type_value = getattr(self, &#34;type&#34;, None)
389+
for empty_allowed in EMPTY_ALLOWED_TYPE_AND_PROPERTY_LIST:
390+
if type_value == empty_allowed[&#34;type&#34;] and key == empty_allowed[&#34;property&#34;]:
391+
return True
392+
360393
has_len = getattr(value, &#34;__len__&#34;, None) is not None
361394
if has_len: # skipcq: PYL-R1705
362395
return len(value) &gt; 0

docs/static/api-docs/slack_sdk/models/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ <h3>Ancestors</h3>
294294
value = getattr(self, key, None)
295295
if value is None:
296296
return False
297+
298+
# Usually, Block Kit components do not allow an empty array for a property value, but there are some exceptions.
299+
# The following code deals with these exceptions:
300+
type_value = getattr(self, &#34;type&#34;, None)
301+
for empty_allowed in EMPTY_ALLOWED_TYPE_AND_PROPERTY_LIST:
302+
if type_value == empty_allowed[&#34;type&#34;] and key == empty_allowed[&#34;property&#34;]:
303+
return True
304+
297305
has_len = getattr(value, &#34;__len__&#34;, None) is not None
298306
if has_len: # skipcq: PYL-R1705
299307
return len(value) &gt; 0
@@ -407,6 +415,14 @@ <h3>Methods</h3>
407415
value = getattr(self, key, None)
408416
if value is None:
409417
return False
418+
419+
# Usually, Block Kit components do not allow an empty array for a property value, but there are some exceptions.
420+
# The following code deals with these exceptions:
421+
type_value = getattr(self, &#34;type&#34;, None)
422+
for empty_allowed in EMPTY_ALLOWED_TYPE_AND_PROPERTY_LIST:
423+
if type_value == empty_allowed[&#34;type&#34;] and key == empty_allowed[&#34;property&#34;]:
424+
return True
425+
410426
has_len = getattr(value, &#34;__len__&#34;, None) is not None
411427
if has_len: # skipcq: PYL-R1705
412428
return len(value) &gt; 0

docs/static/api-docs/slack_sdk/version.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_sdk.version</code></h1>
2828
<span>Expand source code</span>
2929
</summary>
3030
<pre><code class="python">&#34;&#34;&#34;Check the latest version at https://pypi.org/project/slack-sdk/&#34;&#34;&#34;
31-
__version__ = &#34;3.33.2&#34;</code></pre>
31+
__version__ = &#34;3.33.3&#34;</code></pre>
3232
</details>
3333
</section>
3434
<section>

slack_sdk/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Check the latest version at https://pypi.org/project/slack-sdk/"""
2-
__version__ = "3.33.2"
2+
__version__ = "3.33.3"

0 commit comments

Comments
 (0)