ComPWA/compwa.github.io#256 created a .pre-commit folder for local pre-commit hooks. These hooks don't work when pre-commit is run from another working directory. To fix this, the project can be made installable with the source code for the local pre-commit hooks under the src directory.
See for example here.