I found a minor bug in pre-commit which reports __main__.py instead of pre-commit when is asked about its version using module calling.
python -m pre_commit --version
__main__.py 1.20.0
I would be nice to find a solution for it as I observed this issue on other projects too. Still, it seems that tools like pip, virtualenv, tox or pytest are not affected by this bug.
Calling tools as python modules is quite common on CI as it avoids two common issues: exec install path not in in PATH, wrong python interpreter would be used.
I found a minor bug in
pre-commitwhich reports__main__.pyinstead ofpre-commitwhen is asked about its version using module calling.I would be nice to find a solution for it as I observed this issue on other projects too. Still, it seems that tools like pip, virtualenv, tox or pytest are not affected by this bug.
Calling tools as python modules is quite common on CI as it avoids two common issues: exec install path not in in PATH, wrong python interpreter would be used.