ca-slack-block-kit 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ca-slack-block-kit
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: A collection of simple, pre-configured Slack block kit components to use with Slack notification messages.
5
5
  Author: Matthew Cane
6
6
  Author-email: Matthew Cane <matthew.cane@citizensadvice.org.uk>
@@ -9,14 +9,34 @@ required by the Slack API.
9
9
  """
10
10
 
11
11
  from abc import ABC, abstractmethod
12
+ from collections.abc import Sequence
12
13
  from dataclasses import dataclass
13
14
 
14
- from .emoji import Emoji # type: ignore[import]
15
15
 
16
- __all__ = ["Emoji"]
17
-
18
-
19
- def render_blocks(blocks: list["Block"]) -> list[dict]:
16
+ @dataclass(frozen=True)
17
+ class Emoji:
18
+ """Various emojis for easy use with Slack messages."""
19
+
20
+ THUMBS_UP = ":thumbsup:"
21
+ THUMBS_DOWN = ":thumbsdown:"
22
+ PARTY_POPPER = ":tada:"
23
+ WARNING = ":warning:"
24
+ CHECK_MARK = ":white_check_mark:"
25
+ CROSS_MARK = ":x:"
26
+ INFO = ":information_source:"
27
+ ROCKET = ":rocket:"
28
+ EYES = ":eyes:"
29
+ FIRE = ":fire:"
30
+ STAR = ":star:"
31
+ HEART = ":heart:"
32
+ CLAP = ":clap:"
33
+ LIGHT_BULB = ":bulb:"
34
+ HOURGLASS = ":hourglass_flowing_sand:"
35
+ BUG = ":bug:"
36
+ SPARKLES = ":sparkles:"
37
+
38
+
39
+ def render_blocks(blocks: Sequence["Block"]) -> list[dict]:
20
40
  """Render a list of Block objects into a list of dictionaries compatible with the Slack SDK client chat_postMessage function.
21
41
 
22
42
  Args:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ca-slack-block-kit"
3
- version = "1.2.0"
3
+ version = "1.2.2"
4
4
  description = "A collection of simple, pre-configured Slack block kit components to use with Slack notification messages."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -1,24 +0,0 @@
1
- from dataclasses import dataclass
2
-
3
-
4
- @dataclass(frozen=True)
5
- class Emoji:
6
- """Various emojis for easy use with Slack messages."""
7
-
8
- THUMBS_UP = ":thumbsup:"
9
- THUMBS_DOWN = ":thumbsdown:"
10
- PARTY_POPPER = ":tada:"
11
- WARNING = ":warning:"
12
- CHECK_MARK = ":white_check_mark:"
13
- CROSS_MARK = ":x:"
14
- INFO = ":information_source:"
15
- ROCKET = ":rocket:"
16
- EYES = ":eyes:"
17
- FIRE = ":fire:"
18
- STAR = ":star:"
19
- HEART = ":heart:"
20
- CLAP = ":clap:"
21
- LIGHT_BULB = ":bulb:"
22
- HOURGLASS = ":hourglass_flowing_sand:"
23
- BUG = ":bug:"
24
- SPARKLES = ":sparkles:"