init.detect_modules(): Add base_types filter #80
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20260824-init-detect-modules-add-base-types-filter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.