Commit 746e567
committed
Fix type warning from ty
error[invalid-argument-type]: Argument to function `render_blocks` is incorrect
--> tests/integration_test.py:56:30
|
56 | blocks=render_blocks(blocks),
| ^^^^^^ Expected `list[Block]`, found `list[Header | Divider | MarkdownSection | MarkdownSectionFields | CodeBlock]`
|
info: Function defined here
--> ca_slack_block_kit/__init__.py:38:5
|
38 | def render_blocks(blocks: list["Block"]) -> list[dict]:
| ^^^^^^^^^^^^^ --------------------- Parameter declared here
|
info: `list` is invariant in its type parameter
info: Consider using the covariant supertype `collections.abc.Sequence`
info: For more information, see https://docs.astral.sh/ty/reference/typing-faq/#invariant-generics1 parent 68b2deb commit 746e567
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments