Commit 5b2510c
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 5b2510c
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments