Update all .py source files by
$ pyupgrade --py3-only $(git ls-files | grep ".py$")
to modernize the code according to Python 3 syntaxes.
Also introduce pre-commit and its pyupgrade hook to avoid merging
additional Python 2 syntaxes.
Change-Id: I12d2ccc679e0fcb3e3f467ee59da0aabb61a04a2