The outputs provided by the Python version should be exactly the same as the ones from the shell version.
There is small improvement here: Previously only the dependency of flake9
was checked, now all dependencies are checked before running.
I also tried to mostly follow the recommendations here but happy to make more changes if there is still room for improvement.