feature/Empty-tree-exclusions · L-261015-855658

Merged
LC
21d ago
+153-11

An empty tree's refusal now carries what the listing kept out: list_method_tree and list_method_tree_at_root raise EmptyMethodTreeError, a MethodTreeRefusedError holding the root, the excluded files and directories and their raw paths, so a caller listing a directory for its nested packages, as pipelex does for a library directory, learns them even when the directory's own tree is empty. The refusal record stays the conformance corpus's {"code": "empty_tree", "names": []}, so existing callers behave as before.

Closes L-261015-855658
Advances L-261012-989e43

🤖 Generated with Claude Code


Summary by cubic

list_method_tree and list_method_tree_at_root now refuse a directory whose own tree is empty with EmptyMethodTreeError, a MethodTreeRefusedError that also carries the listing's root, excluded_files, excluded_directories, and raw_paths. This lets a caller listing a directory for its nested packages learn them even when the directory holds nothing else. The refusal record stays the conformance corpus's {"code": "empty_tree", "names": []}, so existing callers catching MethodTreeRefusedError are unaffected; the lister still never returns an empty tree.

Closes L-261015-855658, advances L-261012-989e43.