IEFS003: init_exports¶
init.py exports every @task function from the main file.
Category: file_structure ยท Applies to: eval
What it does¶
Reads the task functions from the main file and checks each name appears in __init__.py, either in __all__ or imported with from ... import. One diagnostic per missing task.
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"]
Suppress on a line with # inspect-evals-lint: ignore[IEFS003] or ignore[init_exports]; select or ignore it in configuration by either, or by the prefix IEFS.