Check for some forbidden Python statements in the pre-commit hook