I'm trying to write an Atlassian Stash pre-receive hook that will check if pushed code's python files comply with the python PEP-8 style convention. There are already two tools that do exactly what I want-- pep8 and yapf.
However, I do not know how to integrate these tools to be used in a Stash pre-receive hook, which has to be written in Java. If I'm writing a Stash pre-receive hook in Java, how can I make use of pep8 and yapf?