Format codebase with black and check formatting in CQ

Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught
by flake8. Also check black formatting in run_tests (and CQ).

Bug: b/267675342
Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
diff --git a/setup.py b/setup.py
index 848b3f6..f50eb47 100755
--- a/setup.py
+++ b/setup.py
@@ -23,39 +23,39 @@
 
 
 # Rip out the first intro paragraph.
-with open(os.path.join(TOPDIR, 'README.md')) as fp:
+with open(os.path.join(TOPDIR, "README.md")) as fp:
     lines = fp.read().splitlines()[2:]
-    end = lines.index('')
-    long_description = ' '.join(lines[0:end])
+    end = lines.index("")
+    long_description = " ".join(lines[0:end])
 
 
 # https://packaging.python.org/tutorials/packaging-projects/
 setuptools.setup(
-    name='repo',
-    version='2',
-    maintainer='Various',
-    maintainer_email='repo-discuss@googlegroups.com',
-    description='Repo helps manage many Git repositories',
+    name="repo",
+    version="2",
+    maintainer="Various",
+    maintainer_email="repo-discuss@googlegroups.com",
+    description="Repo helps manage many Git repositories",
     long_description=long_description,
-    long_description_content_type='text/plain',
-    url='https://gerrit.googlesource.com/git-repo/',
+    long_description_content_type="text/plain",
+    url="https://gerrit.googlesource.com/git-repo/",
     project_urls={
-        'Bug Tracker': 'https://bugs.chromium.org/p/gerrit/issues/list?q=component:Applications%3Erepo',
+        "Bug Tracker": "https://bugs.chromium.org/p/gerrit/issues/list?q=component:Applications%3Erepo",  # noqa: E501
     },
     # https://pypi.org/classifiers/
     classifiers=[
-        'Development Status :: 6 - Mature',
-        'Environment :: Console',
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: Apache Software License',
-        'Natural Language :: English',
-        'Operating System :: MacOS :: MacOS X',
-        'Operating System :: Microsoft :: Windows :: Windows 10',
-        'Operating System :: POSIX :: Linux',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3 :: Only',
-        'Topic :: Software Development :: Version Control :: Git',
+        "Development Status :: 6 - Mature",
+        "Environment :: Console",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: Apache Software License",
+        "Natural Language :: English",
+        "Operating System :: MacOS :: MacOS X",
+        "Operating System :: Microsoft :: Windows :: Windows 10",
+        "Operating System :: POSIX :: Linux",
+        "Programming Language :: Python :: 3",
+        "Programming Language :: Python :: 3 :: Only",
+        "Topic :: Software Development :: Version Control :: Git",
     ],
-    python_requires='>=3.6',
-    packages=['subcmds'],
+    python_requires=">=3.6",
+    packages=["subcmds"],
 )