Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/reference/models/blocks/block_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -3392,7 +3392,7 @@ <h3>Inherited members</h3>

@property
def attributes(self) -&gt; Set[str]: # type: ignore[override]
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;})
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;, &#34;style&#34;})

def __init__(
self,
Expand All @@ -3401,6 +3401,7 @@ <h3>Inherited members</h3>
format: str,
url: Optional[str] = None,
fallback: Optional[str] = None,
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
**others: dict,
):
super().__init__(type=self.type)
Expand All @@ -3409,40 +3410,45 @@ <h3>Inherited members</h3>
self.format = format
self.url = url
self.fallback = fallback
self.style = style

class Broadcast(RichTextElement):
type = &#34;broadcast&#34;

@property
def attributes(self) -&gt; Set[str]: # type: ignore[override]
return super().attributes.union({&#34;range&#34;})
return super().attributes.union({&#34;range&#34;, &#34;style&#34;})

def __init__(
self,
*,
range: str, # channel, here, ..
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
**others: dict,
):
super().__init__(type=self.type)
show_unknown_key_warning(self, others)
self.range = range
self.style = style

class Color(RichTextElement):
type = &#34;color&#34;

@property
def attributes(self) -&gt; Set[str]: # type: ignore[override]
return super().attributes.union({&#34;value&#34;})
return super().attributes.union({&#34;value&#34;, &#34;style&#34;})

def __init__(
self,
*,
value: str,
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
**others: dict,
):
super().__init__(type=self.type)
show_unknown_key_warning(self, others)
self.value = value</code></pre>
self.value = value
self.style = style</code></pre>
</details>
<div class="desc"></div>
<h3>Class variables</h3>
Expand Down
14 changes: 10 additions & 4 deletions docs/reference/models/blocks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6410,7 +6410,7 @@ <h3>Inherited members</h3>

@property
def attributes(self) -&gt; Set[str]: # type: ignore[override]
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;})
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;, &#34;style&#34;})

def __init__(
self,
Expand All @@ -6419,6 +6419,7 @@ <h3>Inherited members</h3>
format: str,
url: Optional[str] = None,
fallback: Optional[str] = None,
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
**others: dict,
):
super().__init__(type=self.type)
Expand All @@ -6427,40 +6428,45 @@ <h3>Inherited members</h3>
self.format = format
self.url = url
self.fallback = fallback
self.style = style

class Broadcast(RichTextElement):
type = &#34;broadcast&#34;

@property
def attributes(self) -&gt; Set[str]: # type: ignore[override]
return super().attributes.union({&#34;range&#34;})
return super().attributes.union({&#34;range&#34;, &#34;style&#34;})

def __init__(
self,
*,
range: str, # channel, here, ..
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
**others: dict,
):
super().__init__(type=self.type)
show_unknown_key_warning(self, others)
self.range = range
self.style = style

class Color(RichTextElement):
type = &#34;color&#34;

@property
def attributes(self) -&gt; Set[str]: # type: ignore[override]
return super().attributes.union({&#34;value&#34;})
return super().attributes.union({&#34;value&#34;, &#34;style&#34;})

def __init__(
self,
*,
value: str,
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
**others: dict,
):
super().__init__(type=self.type)
show_unknown_key_warning(self, others)
self.value = value</code></pre>
self.value = value
self.style = style</code></pre>
</details>
<div class="desc"></div>
<h3>Class variables</h3>
Expand Down
12 changes: 9 additions & 3 deletions slack_sdk/models/blocks/block_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,7 @@ class Date(RichTextElement):

@property
def attributes(self) -> Set[str]: # type: ignore[override]
return super().attributes.union({"timestamp", "format", "url", "fallback"})
return super().attributes.union({"timestamp", "format", "url", "fallback", "style"})

def __init__(
self,
Expand All @@ -2243,6 +2243,7 @@ def __init__(
format: str,
url: Optional[str] = None,
fallback: Optional[str] = None,
style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
**others: dict,
):
super().__init__(type=self.type)
Expand All @@ -2251,37 +2252,42 @@ def __init__(
self.format = format
self.url = url
self.fallback = fallback
self.style = style

class Broadcast(RichTextElement):
type = "broadcast"

@property
def attributes(self) -> Set[str]: # type: ignore[override]
return super().attributes.union({"range"})
return super().attributes.union({"range", "style"})

def __init__(
self,
*,
range: str, # channel, here, ..
style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
**others: dict,
):
super().__init__(type=self.type)
show_unknown_key_warning(self, others)
self.range = range
self.style = style

class Color(RichTextElement):
type = "color"

@property
def attributes(self) -> Set[str]: # type: ignore[override]
return super().attributes.union({"value"})
return super().attributes.union({"value", "style"})

def __init__(
self,
*,
value: str,
style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
**others: dict,
):
super().__init__(type=self.type)
show_unknown_key_warning(self, others)
self.value = value
self.style = style