#!/usr/bin/env python3
# pylint: disable=invalid-name
"""Meta hook that calls shared hooks."""
import os
import sys

HERE = os.path.dirname(os.path.realpath(__file__))


def main():
    """Execute pre-commmit using shared hook config."""
    cfg = os.path.join(HERE, ".pre-commit-config.yaml")
    cmd = ["pre-commit", "run", "--config", cfg, "--files"] + sys.argv[1:]
    os.execvp(cmd[0], cmd)


if __name__ == "__main__":
    exit(main())  # pylint: disable=consider-using-sys-exit
