Python utility library
- Python 98.5%
- Makefile 1.3%
- Shell 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
This commit fixes tightening type check fallout. add_subcommands() with a string pattern collects every class of the calling module whose name matches the pattern. inspect.getmembers() yields plain objects, so the unannotated collection list is inferred as list[object], which is not compatible with the declared list[type[Cmd]] parameter type, and make check fails on it. Annotate the collection list as list[type[Cmd]] and narrow it to subclasses of Cmd via issubclass(). This makes the implementation match the declared signature and stops classes lacking the Cmd interface from being registered as subcommands, where they would break later when instantiated and treated as Cmd in __add_cmd_to_parser(). Signed-off-by: Jan Lindemann <jan@janware.com> Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 |
||
| .github/workflows | ||
| bin | ||
| conf | ||
| make | ||
| scripts | ||
| src | ||
| test | ||
| .gitignore | ||
| HASH | ||
| Makefile | ||
| RELEASES | ||
| VERSION | ||