#! /usr/bin/env python
"""Configure the MyPy static type checking workflow."""

# Inherit the parent construction environment
Import("env")

target = env.Command(
    target=["mypy.txt", "any-exprs.txt", "types-of-anys.txt"],
    source=["mypy.scons"],
    action=["set -o pipefail; mypy --any-exprs-report ${TARGET.dir} | tee ${TARGET.abspath}"],
)
env.AlwaysBuild(target)
env.Alias("mypy", target)
