pre-commit: run flake8 on more Python files

pre-commit currently runs flake8 only on `gdb/python/**/*.py`.  There
are more files we can run it on, without running it on all the testsuite
files.  Add:

 - gdb/gdb-gdb.py.in
 - gdb/*.py
 - gdb/testsuite/*.py

Fix the new errors that popped up:

    gdb/copyright.py:29:21: W605 invalid escape sequence '\*'
    gdb/copyright.py:29:29: W605 invalid escape sequence '\*'
    gdb/copyright.py:29:38: W605 invalid escape sequence '\*'
    gdb/copyright.py:29:46: W605 invalid escape sequence '\*'
    gdb/copyright.py:34:1: F401 'datetime' imported but unused
    gdb/testsuite/analyze-racy-logs.py:150:9: E722 do not use bare 'except'

Change-Id: Ia864c22d4f170d4e18ce3beb06a86c49966654b2
Approved-By: Tom Tromey <tom@tromey.com>
3 files changed