[IMG178] update pre-commit to include more hooks
- original Gitlab task: IMG178
This PR introduces the following changes:
- more hooks for pre-commit
- enable flake8 hook
- exclude version1, legacy tests, and 3rd party files from flake8 check
This PR introduces the following changes: