Update hacking for Python3

The repo is Python 3 now, so update hacking to version 3.0.1 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Depends-On: https://review.opendev.org/715682
Change-Id: I49a0ba49133f9592089d3829405847bf2ff8b425
(cherry picked from commit 5fb81faee08cbf9a9a1c72503886e94d25ef5f10)

Related-prod: PRODX-6479
Change-Id: I98d0e550100d4ddf805cf378c92cb7cee0d9ddf9
4 files changed