Commit 8924766
fix: add @overload to Engine.render_python_module for correct mypy typing
When archive_name is a str, the method returns tuple[ModuleType, Any].
When archive_name is None (default), it returns just ModuleType.
Without overloads, mypy sees the union return type and rejects tuple
unpacking at call sites (attr-defined: Module has no __iter__).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 3dfcb60 commit 8924766
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
0 commit comments