init.detect_modules(): Add base_types filter #80

Merged
Jan Lindemann merged 1 commit from jan/feature/20260824-init-detect-modules-add-base-types-filter into master 2026-08-24 14:32:12 +02:00 AGit

init.detect_modules(): Add base_types filter

Add a parameter "base_types" to detect_modules(), defaulting to None. If it is not None, a module is only exported if its same-named object inherits from one of the given types. Modules without a same-named class are skipped instead of raising AttributeError, which covers helper modules.

The return annotation becomes Sequence[str] instead of list[str] to remove mutability for easier type checking.

#### init.detect_modules(): Add base_types filter Add a parameter "base_types" to detect_modules(), defaulting to None. If it is not None, a module is only exported if its same-named object inherits from one of the given types. Modules without a same-named class are skipped instead of raising AttributeError, which covers helper modules. The return annotation becomes Sequence[str] instead of list[str] to remove mutability for easier type checking.
init.detect_modules(): Add base_types filter
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m10s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m29s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m5s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m3s
CI / Packaging test (push) Successful in 0s
0407215530
Add a parameter "base_types" to detect_modules(), defaulting to None. If
it is not None, a module is only exported if its same-named object
inherits from one of the given types. Modules without a same-named class
are skipped instead of raising AttributeError, which covers helper
modules.

The return annotation becomes Sequence[str] instead of list[str] to
remove mutability for easier type checking.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2
Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-08-24 14:23:29 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!80
No description provided.