IEFS003: init_exports¶
init.py exports every @task function in the package.
Category: file_structure ยท Applies to: eval
What it does¶
Reads the task functions from every module that defines one and checks each name appears in __init__.py, either in __all__ or imported with from ... import. One diagnostic per missing task, with the import to add.
Why is this bad?¶
inspect eval my_eval/task resolves tasks through the package, so a task the package does not export is a task nobody can run by name.
Example¶
# __init__.py
from .my_eval import my_eval, my_eval_hard
__all__ = ["my_eval", "my_eval_hard"]
See also¶
Suppress on a line with # inspect-evals-lint: ignore[IEFS003] -- <reason> or ignore[init_exports] -- <reason>; select or ignore it in configuration by either, or by the prefix IEFS.