This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit bce9a59c250d3c16ea22e939674a9463ed1acaf2
Author: Dave Brondsema <[email protected]>
AuthorDate: Wed Oct 30 13:06:03 2024 -0400

    pep8 reformatting
---
 Allura/allura/controllers/auth.py                  |   1 +
 Allura/allura/controllers/rest.py                  |   1 +
 Allura/allura/lib/custom_middleware.py             |   4 +-
 Allura/allura/lib/helpers.py                       |   2 +
 Allura/allura/lib/patches.py                       |   2 +
 Allura/allura/lib/plugin.py                        |   1 -
 Allura/allura/lib/security.py                      |   2 +-
 Allura/allura/lib/solr.py                          |   4 +-
 Allura/allura/lib/widgets/oauth_widgets.py         |   1 -
 Allura/allura/lib/widgets/project_list.py          |   6 +-
 Allura/allura/model/auth.py                        |   2 +-
 Allura/allura/model/discuss.py                     |   2 +-
 Allura/allura/model/index.py                       |   2 +-
 Allura/allura/model/notification.py                |   4 +-
 Allura/allura/model/repo_refresh.py                |   2 +-
 Allura/allura/model/session.py                     |   2 +-
 Allura/allura/model/timeline.py                    |   1 +
 Allura/allura/scripts/refreshrepo.py               |   2 +-
 Allura/allura/tasks/admin_tasks.py                 |   1 +
 Allura/allura/templates/__init__.py                |   1 -
 Allura/allura/templates_responsive/__init__.py     |   2 +-
 Allura/allura/tests/exclude_from_rewrite_hook.py   |   2 +-
 Allura/allura/tests/functional/__init__.py         |   1 -
 Allura/allura/tests/functional/test_admin.py       |   2 +-
 Allura/allura/tests/functional/test_auth.py        |  54 +++++---
 Allura/allura/tests/functional/test_feeds.py       |   2 +-
 .../tests/functional/test_personal_dashboard.py    |   2 +-
 Allura/allura/tests/functional/test_rest.py        |   2 +-
 Allura/allura/tests/functional/test_root.py        |   2 +-
 Allura/allura/tests/model/__init__.py              |   1 -
 Allura/allura/tests/model/test_artifact.py         |   2 +
 Allura/allura/tests/model/test_auth.py             |  14 +-
 Allura/allura/tests/model/test_discussion.py       |   2 +-
 Allura/allura/tests/model/test_filesystem.py       |   2 +
 Allura/allura/tests/model/test_repo.py             |  13 +-
 Allura/allura/tests/scripts/__init__.py            |   1 -
 .../tests/scripts/test_create_sitemap_files.py     |   2 +-
 Allura/allura/tests/templates/__init__.py          |   1 -
 .../tests/templates/jinja_master/__init__.py       |   1 -
 Allura/allura/tests/test_globals.py                |   2 +-
 Allura/allura/tests/test_helpers.py                |   5 +-
 Allura/allura/tests/test_markdown.py               |   2 +-
 Allura/allura/tests/test_plugin.py                 |   6 +-
 Allura/allura/tests/test_validators.py             |   6 +-
 .../test_discussion_moderation_controller.py       |   2 +-
 Allura/allura/tests/unit/test_app.py               |   2 +-
 Allura/allura/tests/unit/test_artifact.py          |   2 +-
 Allura/allura/tests/unit/test_session.py           |   4 +-
 Allura/allura/tests/unit/test_solr.py              |   2 +-
 Allura/allura/websetup/bootstrap.py                |   5 +-
 Allura/ldap-setup.py                               |   1 +
 Allura/ldap-userconfig.py                          |   1 +
 Allura/setup.py                                    |   2 +-
 AlluraTest/alluratest/smtp_debug.py                |   2 +-
 AlluraTest/alluratest/test_syntax.py               |   1 -
 .../forgeactivity/tests/functional/test_root.py    |   2 +-
 ForgeBlog/forgeblog/tests/test_commands.py         |   2 +-
 ForgeBlog/forgeblog/widgets.py                     |   2 +-
 ForgeChat/forgechat/model/chat.py                  |   1 +
 .../forgediscussion/widgets/forum_widgets.py       |   2 +-
 ForgeFeedback/forgefeedback/feedback_main.py       |   9 +-
 .../forgefeedback/tests/functional/test_root.py    |   1 -
 ForgeFeedback/setup.py                             |   4 -
 ForgeFiles/forgefiles/files_main.py                |  17 ---
 ForgeFiles/forgefiles/model/files.py               |   3 -
 ForgeFiles/forgefiles/tests/__init__.py            |   1 -
 ForgeFiles/forgefiles/tests/functional/__init__.py |   1 -
 .../forgefiles/tests/functional/test_root.py       |   2 +-
 ForgeFiles/forgefiles/tests/model/__init__.py      |   1 -
 ForgeGit/forgegit/tests/test_tasks.py              |   1 -
 ForgeImporters/forgeimporters/forge/discussion.py  |  40 +++---
 .../forgeimporters/github/tests/test_utils.py      |   2 +-
 .../forgeimporters/github/tests/test_wiki.py       |   2 +-
 .../forgeimporters/tests/forge/test_discussion.py  | 154 ++++++++++-----------
 .../forgeimporters/tests/forge/test_tracker.py     |   4 +-
 .../tests/github/functional/test_github.py         |   1 -
 .../forgeimporters/tests/github/test_tracker.py    |   2 +-
 ForgeImporters/forgeimporters/tests/test_base.py   |   4 +-
 .../forgeimporters/trac/tests/test_tickets.py      |  11 +-
 ForgeSVN/forgesvn/tests/functional/test_auth.py    |   2 +-
 ForgeSVN/forgesvn/tests/model/test_repository.py   |   2 +-
 ForgeTracker/forgetracker/import_support.py        |   2 +-
 ForgeTracker/forgetracker/search.py                |   2 +-
 .../forgetracker/tests/unit/test_ticket_model.py   |   2 +-
 ForgeTracker/forgetracker/widgets/ticket_search.py |   1 -
 ForgeUserStats/forgeuserstats/tests/test_model.py  |   4 +-
 ForgeWiki/forgewiki/model/wiki.py                  |   1 +
 ForgeWiki/forgewiki/tests/test_models.py           |   1 +
 conftest.py                                        |   3 +-
 scripts/changelog.py                               |   1 +
 scripts/migrations/013-update-ordinals.py          |   1 +
 .../015-add-neighborhood_id-to-blog-posts.py       |   1 +
 .../migrations/020-remove-wiki-title-slashes.py    |   1 +
 scripts/migrations/022-change-anon-display-name.py |   1 +
 .../migrations/024-migrate-custom-profile-text.py  |   1 +
 scripts/migrations/025-add-is-nbhd-project.py      |   1 +
 scripts/migrations/026-install-activity-tool.py    |   1 +
 .../027-change-ticket-write-permissions.py         |   1 +
 scripts/migrations/028-remove-svn-trees.py         |   1 +
 scripts/migrations/029-set-mailbox-queue_empty.py  |   1 +
 .../migrations/031-set-user-pending-to-false.py    |   1 +
 ...34-update_subscriptions_ticket_and_mr_titles.py |   2 +-
 scripts/perf/load-up-forum.py                      |   2 +-
 scripts/perf/sstress.py                            |   1 +
 scripts/perf/test_git_lcd.py                       |   1 +
 105 files changed, 256 insertions(+), 247 deletions(-)

diff --git a/Allura/allura/controllers/auth.py 
b/Allura/allura/controllers/auth.py
index 770281005..0b6a7e1d2 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -1545,6 +1545,7 @@ class OAuthController(BaseController):
         flash('Authorization revoked')
         redirect('.')
 
+
 class OAuth2AuthorizationController(BaseController):
     def _check_security(self):
         require_authenticated()
diff --git a/Allura/allura/controllers/rest.py 
b/Allura/allura/controllers/rest.py
index 82a39e1f4..0c45bb16e 100644
--- a/Allura/allura/controllers/rest.py
+++ b/Allura/allura/controllers/rest.py
@@ -546,6 +546,7 @@ class Oauth2Negotiator:
         response.status_int = status
         return body
 
+
 def rest_has_access(obj, user, perm):
     """
     Helper function that encapsulates common functionality for has_access API
diff --git a/Allura/allura/lib/custom_middleware.py 
b/Allura/allura/lib/custom_middleware.py
index 0e8c0392a..9e937a66d 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -326,7 +326,7 @@ class AlluraTimerMiddleware(TimerMiddleware):
                   debug_each_call=False),
             Timer('ming', ming.odm.odmsession.ODMSession,
                   'insert_now', 'update_now', 'delete_now',
-                  'find', 'find_one_and_update', 'find_one_and_replace', 
'find_one_and_delete', 
+                  'find', 'find_one_and_update', 'find_one_and_replace', 
'find_one_and_delete',
                   'remove', 'update', 'update_if_not_modified',
                   'aggregate', 'distinct',
                   ),
@@ -502,7 +502,7 @@ class ContentSecurityPolicyMiddleware:
                 srcs += ' ' + ' '.join(environ['csp_form_actions'])
 
             oauth_endpoints = (
-            '/auth/oauth2/authorize', '/auth/oauth2/do_authorize', 
'/rest/oauth/authorize', '/rest/oauth/do_authorize')
+                '/auth/oauth2/authorize', '/auth/oauth2/do_authorize', 
'/rest/oauth/authorize', '/rest/oauth/do_authorize')
             if not req.path.startswith(oauth_endpoints):  # Do not enforce CSP 
for OAuth1 and OAuth2 authorization
                 if asbool(self.config.get('csp.form_actions_enforce', False)):
                     rules.add(f"form-action {srcs}")
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 8631f09ca..a8a903da7 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -1051,6 +1051,7 @@ class NoInternalHTTPSHandler(urllib.request.HTTPSHandler):
             validators.NonPrivateUrl().to_python(req.full_url, None)
         return super().https_open(req)
 
+
 class UseKnownIPHTTPConnection(http.client.HTTPConnection):
     # only for http, since https requires a valid cert it should be ok
     def __init__(self, *a, known_ip_to_use=None, **kw):
@@ -1073,6 +1074,7 @@ class NotInternalHTTPHandler(urllib.request.HTTPHandler):
         else:
             return super().http_open(req)
 
+
 
urllib.request.install_opener(urllib.request.build_opener(NotInternalHTTPHandler,
 NoInternalHTTPSHandler))
 
 
diff --git a/Allura/allura/lib/patches.py b/Allura/allura/lib/patches.py
index d8d642394..ec810fab1 100644
--- a/Allura/allura/lib/patches.py
+++ b/Allura/allura/lib/patches.py
@@ -24,6 +24,8 @@ from tg import request
 from allura.lib import helpers as h
 
 _patched = False
+
+
 def apply():
     global _patched  # noqa: PLW0603
     if _patched:
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index fa059bd38..6275c20bc 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -820,7 +820,6 @@ class LdapAuthenticationProvider(AuthenticationProvider):
                 raise ValueError(f'LDAP algorithms should always start with 
ldap_ (got {algorithm})')
         return crypt
 
-
     def set_password(self, user, old_password, new_password, 
set_timestamp=True):
         dn = ldap_user_dn(user.username)
         if old_password is not None:
diff --git a/Allura/allura/lib/security.py b/Allura/allura/lib/security.py
index 1db9f19c2..10805f093 100644
--- a/Allura/allura/lib/security.py
+++ b/Allura/allura/lib/security.py
@@ -304,7 +304,7 @@ def debug_obj(obj) -> str:
     return str(obj)
 
 
-def has_access(obj, permission: str, user: M.User | None = None, project: 
M.Project | None = None, roles = None) -> bool:
+def has_access(obj, permission: str, user: M.User | None = None, project: 
M.Project | None = None, roles=None) -> bool:
     '''Return whether the given user has the permission name on the given 
object.
 
     - First, all the roles for a user in the given project context are 
computed.
diff --git a/Allura/allura/lib/solr.py b/Allura/allura/lib/solr.py
index 49511d8aa..68fddb3c6 100644
--- a/Allura/allura/lib/solr.py
+++ b/Allura/allura/lib/solr.py
@@ -62,7 +62,7 @@ def escape_solr_arg(term):
     return term
 
 
-def make_solr_from_config(push_servers: Iterable[str], query_server: 
str|None=None,
+def make_solr_from_config(push_servers: Iterable[str], query_server: str | 
None = None,
                           push_servers_auths: Iterable[tuple[str, str] | None] 
= (),
                           query_server_auth: tuple[str, str] | None = None,
                           **kwargs):
@@ -91,7 +91,7 @@ class Solr:
     unless explicitly overridden.
     """
 
-    def __init__(self, push_servers: Iterable[str], query_server: str|None = 
None,
+    def __init__(self, push_servers: Iterable[str], query_server: str | None = 
None,
                  push_servers_auths: Iterable[tuple[str, str] | None] = (),
                  query_server_auth: tuple[str, str] | None = None,
                  commit=True, commitWithin=None, **kw):
diff --git a/Allura/allura/lib/widgets/oauth_widgets.py 
b/Allura/allura/lib/widgets/oauth_widgets.py
index 7fe33b75e..5823907d4 100644
--- a/Allura/allura/lib/widgets/oauth_widgets.py
+++ b/Allura/allura/lib/widgets/oauth_widgets.py
@@ -81,4 +81,3 @@ class OAuth2ApplicationForm(ForgeForm):
             attrs=dict(type='url', style='min-width:25em; margin-left: 
162px;',  # match grid-4 label width
                        pattern='https://.*', title='must start with https://'),
         )
-
diff --git a/Allura/allura/lib/widgets/project_list.py 
b/Allura/allura/lib/widgets/project_list.py
index b91d2dd84..d0d643e0c 100644
--- a/Allura/allura/lib/widgets/project_list.py
+++ b/Allura/allura/lib/widgets/project_list.py
@@ -37,7 +37,7 @@ class ProjectSummary(ew_core.Widget):
         show_proj_icon=True,
         show_download_button=True,
         show_awards_banner=True,
-        )
+    )
 
     def prepare_context(self, context):
         response = super().prepare_context(context)
@@ -84,7 +84,7 @@ class ProjectList(ew_core.Widget):
         show_proj_icon=True,
         show_download_button=True,
         show_awards_banner=True,
-        )
+    )
 
     def prepare_context(self, context):
         response = super().prepare_context(context)
@@ -121,4 +121,4 @@ class ProjectScreenshots(ew_core.Widget):
     def resources(self):
         yield ew.JSLink('allura/js/Sortable.min.js')
         yield ew.JSLink('js/screenshots.js')
-        yield ew.CSSLink('css/screenshots.css')
\ No newline at end of file
+        yield ew.CSSLink('css/screenshots.css')
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 51dc98617..a14cbf2ad 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -175,7 +175,7 @@ please visit the following URL:
 '''.format(self.email,
             self.claimed_by_user(include_pending=True).username,
             h.absurl(f'/auth/verify_addr?a={h.urlquote(self.nonce)}'),
-       )
+           )
         log.info('Verification email:\n%s', text)
         allura.tasks.mail_tasks.sendsimplemail.post(
             fromaddr=g.noreply,
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 6cb0b6ef3..35d07cc77 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -405,7 +405,7 @@ class Thread(Artifact, ActivityObject):
             if (has_access(self, 'moderate', u)
                 and Mailbox.subscribed(user_id=u._id,
                                        app_config_id=post.app_config_id)):
-                    n.send_direct(str(u._id))
+                n.send_direct(str(u._id))
 
     def update_stats(self):
         self.num_replies = self.post_class().query.find(
diff --git a/Allura/allura/model/index.py b/Allura/allura/model/index.py
index 50b33999f..64f5526b4 100644
--- a/Allura/allura/model/index.py
+++ b/Allura/allura/model/index.py
@@ -170,7 +170,7 @@ class Shortlink(MappedClass):
             result = {}
             # Parse all the links
             parsed_links = {link: cls._parse_link(link)
-                                for link in links}
+                            for link in links}
             links_by_artifact = defaultdict(list)
             project_ids = set()
             for link, d in list(parsed_links.items()):
diff --git a/Allura/allura/model/notification.py 
b/Allura/allura/model/notification.py
index a8b5a7625..337411c3d 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -237,7 +237,7 @@ class Notification(MappedClass):
             but the notification still gets sent if there is an error
             '''
             log.warning('Could not render notification template %s' %
-                     artifact.type_s, exc_info=True)
+                        artifact.type_s, exc_info=True)
 
         assert d['reply_to_address'] is not None
         project = c.project
@@ -622,7 +622,7 @@ class Mailbox(MappedClass):
                         queue=[],
                         queue_empty=True,
                         )},
-                )
+            )
             mbox.fire(now)
 
     def fire(self, now):
diff --git a/Allura/allura/model/repo_refresh.py 
b/Allura/allura/model/repo_refresh.py
index e5dbbbea2..2e1fa2a3a 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -92,7 +92,7 @@ def refresh_repo(repo, all_commits=False, notify=True, 
new_clone=False, commits_
             if user is not None:
                 g.statsUpdater.newCommit(new, repo.app_config.project, user)
             actor = user or TransientActor(
-                    activity_name=new.committed.name or new.committed.email)
+                activity_name=new.committed.name or new.committed.email)
             g.director.create_activity(actor, 'committed', new, 
target=repo.app,
                                        related_nodes=[repo.app_config.project],
                                        tags=['commit', repo.tool.lower()])
diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py
index 2752afa46..fb577f6be 100644
--- a/Allura/allura/model/session.py
+++ b/Allura/allura/model/session.py
@@ -273,7 +273,7 @@ task_doc_session = Session.by_name('task')
 main_orm_session = ThreadLocalODMSession(
     doc_session=main_doc_session,
     extensions=[IndexerSessionExtension]
-    )
+)
 main_explicitflush_orm_session = ThreadLocalODMSession(
     doc_session=main_doc_session,
     extensions=[IndexerSessionExtension, ExplicitFlushOnlySessionExtension]
diff --git a/Allura/allura/model/timeline.py b/Allura/allura/model/timeline.py
index 6c343bd6f..db3bbc342 100644
--- a/Allura/allura/model/timeline.py
+++ b/Allura/allura/model/timeline.py
@@ -114,6 +114,7 @@ class TransientActor(NodeBase, ActivityObjectBase):
     """An activity actor which is not a persistent Node in the network.
 
     """
+
     def __init__(self, activity_name):
         NodeBase.__init__(self)
         ActivityObjectBase.__init__(self)
diff --git a/Allura/allura/scripts/refreshrepo.py 
b/Allura/allura/scripts/refreshrepo.py
index 7756d1483..af5bee954 100644
--- a/Allura/allura/scripts/refreshrepo.py
+++ b/Allura/allura/scripts/refreshrepo.py
@@ -160,7 +160,7 @@ class RefreshRepo(ScriptTask):
         parser.add_argument('--clean-after', metavar='DATETIME', 
dest='clean_after',
                             type=lambda d: datetime.strptime(d, date_format),
                             help='Like --clean but only docs for commits after 
date ({} format)'.format(
-                                    date_format.replace('%', '%%')
+                                date_format.replace('%', '%%')
                             ))
         parser.add_argument(
             '--all', action='store_true', dest='all', default=False,
diff --git a/Allura/allura/tasks/admin_tasks.py 
b/Allura/allura/tasks/admin_tasks.py
index 9e30247a5..879e83f65 100644
--- a/Allura/allura/tasks/admin_tasks.py
+++ b/Allura/allura/tasks/admin_tasks.py
@@ -32,6 +32,7 @@ def install_app(*args, **kwargs):
     """
     c.project.install_app(*args, **kwargs)
 
+
 install_app.__doc__ += '''
     Arguments::
 
diff --git a/Allura/allura/templates/__init__.py 
b/Allura/allura/templates/__init__.py
index 7b9f3fc3e..5acea7ec6 100644
--- a/Allura/allura/templates/__init__.py
+++ b/Allura/allura/templates/__init__.py
@@ -16,4 +16,3 @@
 #       under the License.
 
 """Templates package for the application."""
-
diff --git a/Allura/allura/templates_responsive/__init__.py 
b/Allura/allura/templates_responsive/__init__.py
index d70ae0770..144e29886 100644
--- a/Allura/allura/templates_responsive/__init__.py
+++ b/Allura/allura/templates_responsive/__init__.py
@@ -13,4 +13,4 @@
 #       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
-#       under the License.
\ No newline at end of file
+#       under the License.
diff --git a/Allura/allura/tests/exclude_from_rewrite_hook.py 
b/Allura/allura/tests/exclude_from_rewrite_hook.py
index 828f994c4..6311e4001 100644
--- a/Allura/allura/tests/exclude_from_rewrite_hook.py
+++ b/Allura/allura/tests/exclude_from_rewrite_hook.py
@@ -46,4 +46,4 @@ def raise_compound_exception():
             assert False, 'assert %d' % x
         except Exception:
             errs.append(sys.exc_info())
-    raise CompoundError(*errs)
\ No newline at end of file
+    raise CompoundError(*errs)
diff --git a/Allura/allura/tests/functional/__init__.py 
b/Allura/allura/tests/functional/__init__.py
index f4a7b12aa..b8c15d776 100644
--- a/Allura/allura/tests/functional/__init__.py
+++ b/Allura/allura/tests/functional/__init__.py
@@ -16,4 +16,3 @@
 #       under the License.
 
 """Functional test suite for the controllers of the application."""
-
diff --git a/Allura/allura/tests/functional/test_admin.py 
b/Allura/allura/tests/functional/test_admin.py
index d0d6ee260..fa3249276 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -405,7 +405,7 @@ class TestProjectAdmin(TestController):
         upload = ('screenshot', file_name, file_data)
 
         self.app.get('/admin/')
-        e_filename, e_fileext =  os.path.splitext(file_name)
+        e_filename, e_fileext = os.path.splitext(file_name)
         with audits('screenshots: added screenshot 
{}'.format(f"{e_filename}-123{e_fileext}")):
             self.app.post('/admin/add_screenshot', params=dict(
                 caption='test me'),
diff --git a/Allura/allura/tests/functional/test_auth.py 
b/Allura/allura/tests/functional/test_auth.py
index a30f938b2..4d0180811 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -2184,7 +2184,11 @@ class TestOAuth2(TestController):
             redirect_uris=['https://localhost/']
         )
         ThreadLocalODMSession.flush_all()
-        r = self.app.get('/auth/oauth2/authorize', params={'client_id': 
'client_12345', 'response_type': 'code', 'redirect_uri': 'https://localhost/'})
+        r = self.app.get('/auth/oauth2/authorize', params={
+            'client_id': 'client_12345',
+            'response_type': 'code',
+            'redirect_uri': 'https://localhost/',
+        })
         assert 'testoauth2' in r.text
         assert 'client_12345' in r.text
 
@@ -2201,11 +2205,14 @@ class TestOAuth2(TestController):
             redirect_uris=['https://localhost/']
         )
         ThreadLocalODMSession.flush_all()
-        r = self.app.get('/auth/oauth2/authorize', params={'client_id': 
'client_12345', 'response_type': 'code', 'redirect_uri': 'https://localhost/'})
+        r = self.app.get('/auth/oauth2/authorize', params={
+            'client_id': 'client_12345',
+            'response_type': 'code',
+            'redirect_uri': 'https://localhost/',
+        })
         r = r.forms[0].submit('no')
         assert M.OAuth2AuthorizationCode.query.get(client_id='client_12345') 
is None
 
-
     @mock.patch.dict(config, {'auth.oauth2.enabled': True})
     def test_authorize_and_create_access_token(self):
         # client owned by someone other than the test-admin user that 
self.app.get/post use
@@ -2225,7 +2232,11 @@ class TestOAuth2(TestController):
         r.mustcontain(no='testoauth2')
 
         # First navigate to the authorization page for the backend to validate 
the authorization request
-        r = self.app.get('/auth/oauth2/authorize', params={'client_id': 
'client_12345', 'response_type': 'code', 'redirect_uri': 'https://localhost/'})
+        r = self.app.get('/auth/oauth2/authorize', params={
+            'client_id': 'client_12345',
+            'response_type': 'code',
+            'redirect_uri': 'https://localhost/',
+        })
         # The submit authorization for the authorization code to be created
         r.forms[0].submit('yes')
 
@@ -2251,7 +2262,6 @@ class TestOAuth2(TestController):
         r = self.app.get('/auth/oauth/')
         r.mustcontain('testoauth2')
 
-
     @mock.patch.dict(config, {'auth.oauth2.enabled': True})
     def test_revoke_auth_code(self):
         # only the auth code is present, and it gets revoked
@@ -2287,7 +2297,6 @@ class TestOAuth2(TestController):
         r = self.app.get('/auth/oauth/')
         r.mustcontain(no='testoauth2')
 
-
     @mock.patch.dict(config, {'auth.oauth2.enabled': True})
     def test_revoke_access_token(self):
         # both auth code and access token are present, both get revoked
@@ -2332,16 +2341,16 @@ class TestOAuth2(TestController):
         r = self.app.get('/auth/oauth/')
         r.mustcontain(no='testoauth2')
 
-
     @mock.patch.dict(config, {'auth.oauth2.enabled': True})
     def test_pkce(self, mock_client, mock_credentials):
         code_verifier = 
'QkatVHgTq_cZj8tTKWPIe78fXpoeszhVq6kLIUxJj8g9tMmfi0XV4dfZHQBXwOiWsLihJotfrOGKR4nZSXA4mA'
         code_challenge = 'BxGpJVKt_l6Srlq3uXPfpxge3TxtxetcWhGXq2958yU'
-        code_challenge_method = 'S256' # Must be uppercase
+        code_challenge_method = 'S256'  # Must be uppercase
 
         # Authorize the app by sending the code challenge and code challenge 
method as qs param
-        params = dict(client_id='client_12345', response_type='code', 
redirect_uri='https://localhost/', code_challenge=code_challenge,
-                        code_challenge_method=code_challenge_method)
+        params = dict(client_id='client_12345', response_type='code', 
redirect_uri='https://localhost/',
+                      code_challenge=code_challenge,
+                      code_challenge_method=code_challenge_method)
         r = self.app.get('/auth/oauth2/authorize', params=params)
 
         # Authorize app
@@ -2352,7 +2361,8 @@ class TestOAuth2(TestController):
         assert ac is not None
 
         # Exchange the authorization code for an access token. It should fail 
if you do not provide the code verifier
-        body = dict(client_id='client_12345', client_secret='98765', 
code=ac.authorization_code, grant_type='authorization_code', 
redirect_uri='https://localhost/')
+        body = dict(client_id='client_12345', client_secret='98765', 
code=ac.authorization_code,
+                    grant_type='authorization_code', 
redirect_uri='https://localhost/')
 
         with pytest.raises(webtest.app.AppError) as ex:
             r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
@@ -2368,7 +2378,8 @@ class TestOAuth2(TestController):
     def test_refresh_token(self, mock_client, mock_valid_token):
         token = M.OAuth2AccessToken.query.get(client_id='client_12345')
 
-        body = dict(client_id='client_12345', client_secret='98765', 
grant_type='refresh_token', refresh_token=token.refresh_token)
+        body = dict(client_id='client_12345', client_secret='98765', 
grant_type='refresh_token',
+                    refresh_token=token.refresh_token)
         r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
         assert r.status_int == 200
         assert r.json['access_token'] != token.access_token
@@ -2376,7 +2387,8 @@ class TestOAuth2(TestController):
 
     @mock.patch.dict(config, {'auth.oauth2.enabled': True})
     def test_invalid_refresh_token(self, mock_client, mock_valid_token):
-        body = dict(client_id='client_12345', client_secret='98765', 
grant_type='refresh_token', refresh_token='invalid_token')
+        body = dict(client_id='client_12345', client_secret='98765', 
grant_type='refresh_token',
+                    refresh_token='invalid_token')
         with pytest.raises(webtest.app.AppError) as ex:
             r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
 
@@ -2387,8 +2399,8 @@ class TestOAuth2(TestController):
         c = M.OAuth2ClientApp.query.get(client_id='client_12345')
         ac = M.OAuth2AuthorizationCode.query.get(client_id='client_12345')
 
-        body = dict(client_id=c.client_id, client_secret=c.client_secret, 
grant_type='authorization_code', code=ac.authorization_code,
-                        redirect_uri=c.redirect_uris[0])
+        body = dict(client_id=c.client_id, client_secret=c.client_secret, 
grant_type='authorization_code',
+                    code=ac.authorization_code, 
redirect_uri=c.redirect_uris[0])
         with pytest.raises(webtest.app.AppError) as ex:
             r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
 
@@ -2399,8 +2411,8 @@ class TestOAuth2(TestController):
         c = M.OAuth2ClientApp.query.get(client_id='client_12345')
         ac = M.OAuth2AuthorizationCode.query.get(client_id='client_12345')
 
-        body = dict(client_id=c.client_id, client_secret=c.client_secret, 
grant_type='authorization_code', code=ac.authorization_code,
-                        redirect_uri='https://invalid.com')
+        body = dict(client_id=c.client_id, client_secret=c.client_secret, 
grant_type='authorization_code',
+                    code=ac.authorization_code, 
redirect_uri='https://invalid.com')
         with pytest.raises(webtest.app.AppError) as ex:
             r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
 
@@ -2412,8 +2424,8 @@ class TestOAuth2(TestController):
         ac = M.OAuth2AuthorizationCode.query.get(client_id='client_12345')
 
         # First test passing an invalid client id
-        body = dict(client_id='invalid_client_id', 
client_secret=c.client_secret, grant_type='authorization_code', 
code=ac.authorization_code,
-                        redirect_uri=c.redirect_uris[0])
+        body = dict(client_id='invalid_client_id', 
client_secret=c.client_secret, grant_type='authorization_code',
+                    code=ac.authorization_code, 
redirect_uri=c.redirect_uris[0])
 
         with pytest.raises(webtest.app.AppError) as ex:
             r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
@@ -2421,8 +2433,8 @@ class TestOAuth2(TestController):
         assert 'invalid_client' in str(ex.value)
 
         # Now test passing an invalid client secret
-        body = dict(client_id=c.client_id, client_secret='invalid_secret', 
grant_type='authorization_code', code=ac.authorization_code,
-                        redirect_uri=c.redirect_uris[0])
+        body = dict(client_id=c.client_id, client_secret='invalid_secret', 
grant_type='authorization_code',
+                    code=ac.authorization_code, 
redirect_uri=c.redirect_uris[0])
 
         with pytest.raises(webtest.app.AppError) as ex:
             r = self.app.post_json('/rest/oauth2/token', body, 
extra_environ={'username': '*anonymous'})
diff --git a/Allura/allura/tests/functional/test_feeds.py 
b/Allura/allura/tests/functional/test_feeds.py
index d3d2eaa1f..9949b5976 100644
--- a/Allura/allura/tests/functional/test_feeds.py
+++ b/Allura/allura/tests/functional/test_feeds.py
@@ -71,7 +71,7 @@ class TestFeeds(TestController):
             'title': 'Root',
             'text': '',
             'labels': '',
-            })
+        })
         self.app.get('/wiki/Root/feed.rss')
         self.app.get('/wiki/Root/feed.atom')
 
diff --git a/Allura/allura/tests/functional/test_personal_dashboard.py 
b/Allura/allura/tests/functional/test_personal_dashboard.py
index b6a68eb3d..68d64392d 100644
--- a/Allura/allura/tests/functional/test_personal_dashboard.py
+++ b/Allura/allura/tests/functional/test_personal_dashboard.py
@@ -87,7 +87,7 @@ class TestMergeRequestsSection(TestController):
         super().setup_method(method)
         setup_unit_test()
         self.setup_with_tools()
-        mr= self.merge_request
+        mr = self.merge_request
         ThreadLocalODMSession.flush_all()
 
     # variation on @with_git but with different project to avoid clashes with 
other tests using git
diff --git a/Allura/allura/tests/functional/test_rest.py 
b/Allura/allura/tests/functional/test_rest.py
index a5ceaeaae..9459ff40c 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -465,7 +465,7 @@ class TestRestHome(TestRestApiBase):
             r = self.api_get('/rest/p/test/wiki/Home')
             params = dict(text=r.json['text'])
             r = self.api_post('/rest/p/test/wiki/Home', params=params)
-            
+
         assert '401 Unauthorized' in str(ex.value)
 
 
diff --git a/Allura/allura/tests/functional/test_root.py 
b/Allura/allura/tests/functional/test_root.py
index d11568388..8c86769e7 100644
--- a/Allura/allura/tests/functional/test_root.py
+++ b/Allura/allura/tests/functional/test_root.py
@@ -191,7 +191,7 @@ class TestRootController(TestController):
     @skipIf(module_not_available('newrelic'), 'requires newrelic')
     def test_newrelic_set_transaction_name(self):
         from allura.controllers.project import NeighborhoodController
-        with mock.patch('newrelic.agent.callable_name') as callable_name,\
+        with mock.patch('newrelic.agent.callable_name') as callable_name, \
                 mock.patch('newrelic.agent.set_transaction_name') as 
set_transaction_name:
             callable_name.return_value = 'foo'
             self.app.get('/p/')
diff --git a/Allura/allura/tests/model/__init__.py 
b/Allura/allura/tests/model/__init__.py
index e2b83dcde..799fda96e 100644
--- a/Allura/allura/tests/model/__init__.py
+++ b/Allura/allura/tests/model/__init__.py
@@ -16,4 +16,3 @@
 #       under the License.
 
 """Model test suite for the models of the application."""
-
diff --git a/Allura/allura/tests/model/test_artifact.py 
b/Allura/allura/tests/model/test_artifact.py
index 33274bda6..9424f90f9 100644
--- a/Allura/allura/tests/model/test_artifact.py
+++ b/Allura/allura/tests/model/test_artifact.py
@@ -51,6 +51,8 @@ class Checkmessage(M.Message):
         super().__init__(**kw)
         if self.slug is not None and self.full_slug is None:
             self.full_slug = datetime.utcnow().strftime('%Y%m%d%H%M%S%f') + 
':' + self.slug
+
+
 Mapper.compile_all()
 
 
diff --git a/Allura/allura/tests/model/test_auth.py 
b/Allura/allura/tests/model/test_auth.py
index 3a6ece759..7afb845d1 100644
--- a/Allura/allura/tests/model/test_auth.py
+++ b/Allura/allura/tests/model/test_auth.py
@@ -87,19 +87,19 @@ class TestAuth:
 
     def test_email_address_canonical(self):
         assert M.EmailAddress.canonical('[email protected]') == \
-               '[email protected]'
+            '[email protected]'
         assert M.EmailAddress.canonical('[email protected]') == \
-               '[email protected]'
+            '[email protected]'
         assert M.EmailAddress.canonical('I Am Nobody <[email protected]>') == 
\
-               '[email protected]'
+            '[email protected]'
         assert M.EmailAddress.canonical('  [email protected]\t') == \
-               '[email protected]'
+            '[email protected]'
         assert M.EmailAddress.canonical('I Am@Nobody <[email protected]> ') 
== \
-               '[email protected]'
+            '[email protected]'
         assert M.EmailAddress.canonical(' No@body <no@[email protected]> ') == \
-               'no@[email protected]'
+            'no@[email protected]'
         assert M.EmailAddress.canonical('no@[email protected]') == \
-               'no@[email protected]'
+            'no@[email protected]'
         assert M.EmailAddress.canonical('invalid') is None
 
     def test_email_address_send_verification_link(self):
diff --git a/Allura/allura/tests/model/test_discussion.py 
b/Allura/allura/tests/model/test_discussion.py
index 5cb6b764c..15b2ed6e1 100644
--- a/Allura/allura/tests/model/test_discussion.py
+++ b/Allura/allura/tests/model/test_discussion.py
@@ -599,4 +599,4 @@ class TestDiscussion:
 
         assert M.BaseAttachment.query.get(filename='discussion.txt')
         assert M.BaseAttachment.query.get(filename='thread.txt')
-        assert not M.BaseAttachment.query.get(filename='post.txt')
\ No newline at end of file
+        assert not M.BaseAttachment.query.get(filename='post.txt')
diff --git a/Allura/allura/tests/model/test_filesystem.py 
b/Allura/allura/tests/model/test_filesystem.py
index 60cd96aed..844a7b7b2 100644
--- a/Allura/allura/tests/model/test_filesystem.py
+++ b/Allura/allura/tests/model/test_filesystem.py
@@ -32,6 +32,8 @@ class File(M.File):
 
     class __mongometa__:
         session = M.session.main_orm_session
+
+
 Mapper.compile_all()
 
 
diff --git a/Allura/allura/tests/model/test_repo.py 
b/Allura/allura/tests/model/test_repo.py
index 7434f4b1b..a553eb3b5 100644
--- a/Allura/allura/tests/model/test_repo.py
+++ b/Allura/allura/tests/model/test_repo.py
@@ -445,14 +445,13 @@ class TestModelCache:
         tr_get.assert_called_once_with(_id='foo')
         assert val == tree1
 
-
     def test_set(self):
         tree = mock.Mock(spec=['_id', 'test_set'], _id='foo', val='test_set')
         self.cache.set(M.repository.Tree, {'val': 'test_set'}, tree)
         assert self.cache._query_cache == \
-                         {M.repository.Tree: {(('val', 'test_set'),): 'foo'}}
+            {M.repository.Tree: {(('val', 'test_set'),): 'foo'}}
         assert self.cache._instance_cache == \
-                         {M.repository.Tree: {'foo': tree}}
+            {M.repository.Tree: {'foo': tree}}
 
     @mock.patch('bson.ObjectId')
     def test_set_none_id(self, obj_id):
@@ -465,7 +464,7 @@ class TestModelCache:
             (('val2', 'test_set2'),): 'OBJID',
         }
         assert self.cache._instance_cache == \
-                         {M.repository.Tree: {'OBJID': tree}}
+            {M.repository.Tree: {'OBJID': tree}}
         tree._id = '_id'
         assert self.cache.get(M.repository.Tree, {'val1': 'test_set1'}) == tree
         assert self.cache.get(M.repository.Tree, {'val2': 'test_set2'}) == tree
@@ -503,7 +502,7 @@ class TestModelCache:
         self.cache.set(M.repository.Tree, {'val': 'tree1'}, tree1)
         self.cache.set(M.repository.Tree, {'val': 'tree2'}, tree2)
         assert set(self.cache.instance_ids(M.repository.Tree)) == \
-                         {'id1', 'id2'}
+            {'id1', 'id2'}
         assert self.cache.instance_ids(M.repository.LastCommit) == []
 
     @mock.patch.object(M.repository.Tree.query, 'find')
@@ -650,9 +649,9 @@ class TestModelCache:
             'tree2': tree2,
         }
         assert session.call_args_list == \
-                         [mock.call(tree1), mock.call(tree2)]
+            [mock.call(tree1), mock.call(tree2)]
         assert session.return_value.flush.call_args_list == \
-                         [mock.call(tree1), mock.call(tree2)]
+            [mock.call(tree1), mock.call(tree2)]
         assert not session.return_value.expunge.called
 
     @mock.patch('allura.model.repository.session')
diff --git a/Allura/allura/tests/scripts/__init__.py 
b/Allura/allura/tests/scripts/__init__.py
index 77505f1c3..144e29886 100644
--- a/Allura/allura/tests/scripts/__init__.py
+++ b/Allura/allura/tests/scripts/__init__.py
@@ -14,4 +14,3 @@
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
 #       under the License.
-
diff --git a/Allura/allura/tests/scripts/test_create_sitemap_files.py 
b/Allura/allura/tests/scripts/test_create_sitemap_files.py
index 8097f169e..07c858d8c 100644
--- a/Allura/allura/tests/scripts/test_create_sitemap_files.py
+++ b/Allura/allura/tests/scripts/test_create_sitemap_files.py
@@ -44,7 +44,7 @@ class TestCreateSitemapFiles:
             rmtree(tmpdir.path)  # needs to be non-existent for the script
             self.run_script(['-o', tmpdir.path])
 
-            tmpdir.compare(['sitemap-0.xml', 'sitemap.xml'],recursive=False, 
files_only=True)
+            tmpdir.compare(['sitemap-0.xml', 'sitemap.xml'], recursive=False, 
files_only=True)
 
             xml_index = ET.parse(os.path.join(tmpdir.path, 'sitemap.xml'))
             ns = {'ns0': 'http://www.sitemaps.org/schemas/sitemap/0.9'}
diff --git a/Allura/allura/tests/templates/__init__.py 
b/Allura/allura/tests/templates/__init__.py
index 77505f1c3..144e29886 100644
--- a/Allura/allura/tests/templates/__init__.py
+++ b/Allura/allura/tests/templates/__init__.py
@@ -14,4 +14,3 @@
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
 #       under the License.
-
diff --git a/Allura/allura/tests/templates/jinja_master/__init__.py 
b/Allura/allura/tests/templates/jinja_master/__init__.py
index 77505f1c3..144e29886 100644
--- a/Allura/allura/tests/templates/jinja_master/__init__.py
+++ b/Allura/allura/tests/templates/jinja_master/__init__.py
@@ -14,4 +14,3 @@
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
 #       under the License.
-
diff --git a/Allura/allura/tests/test_globals.py 
b/Allura/allura/tests/test_globals.py
index c88623c5d..9f93a51f2 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -792,7 +792,7 @@ class TestCachedMarkdown:
         html = self.md.cached_convert(self.post, 'text')
         assert html == self.expected_html
         assert html == self.post.text_cache.html
-        assert hashlib.md5(self.post.text.encode('utf-8')).hexdigest()  == 
self.post.text_cache.md5
+        assert hashlib.md5(self.post.text.encode('utf-8')).hexdigest() == 
self.post.text_cache.md5
         assert self.post.text_cache.render_time > 0
 
     @patch.dict('allura.lib.app_globals.config', 
markdown_cache_threshold='-0.01')
diff --git a/Allura/allura/tests/test_helpers.py 
b/Allura/allura/tests/test_helpers.py
index 817abde69..d9f223479 100644
--- a/Allura/allura/tests/test_helpers.py
+++ b/Allura/allura/tests/test_helpers.py
@@ -16,7 +16,7 @@
 #       under the License.
 
 import io
-from unittest import  skipIf
+from unittest import skipIf
 from os import path
 from datetime import datetime, timedelta
 import time
@@ -47,6 +47,7 @@ from alluratest.controller import setup_basic_test
 # httpbin.io does not allow /redirect-to to localhost
 httpbin_domain = 'httpbin.dev'
 
+
 def setup_module():
     setup_basic_test()
 
@@ -628,7 +629,7 @@ class TestIterEntryPoints:
 
         with pytest.raises(ImportError, match=r'Ambiguous \[allura\] entry 
points detected. '
                                               'Multiple entry points with name 
"myapp".'):
-           list(h.iter_entry_points('allura'))
+            list(h.iter_entry_points('allura'))
 
 
 def test_get_user_status():
diff --git a/Allura/allura/tests/test_markdown.py 
b/Allura/allura/tests/test_markdown.py
index 3e56fe81e..5975d0d2d 100644
--- a/Allura/allura/tests/test_markdown.py
+++ b/Allura/allura/tests/test_markdown.py
@@ -131,4 +131,4 @@ Not *strong* or _underlined_."""
         md = markdown.Markdown(
             extensions=[mde.CommitMessageExtension(app), 
'markdown.extensions.nl2br'],
             output_format='html')
-        assert md.convert(text) == expected_html
\ No newline at end of file
+        assert md.convert(text) == expected_html
diff --git a/Allura/allura/tests/test_plugin.py 
b/Allura/allura/tests/test_plugin.py
index 5bdaf5751..4118abb2e 100644
--- a/Allura/allura/tests/test_plugin.py
+++ b/Allura/allura/tests/test_plugin.py
@@ -638,9 +638,9 @@ class TestLocalAuthenticationProvider:
         assert ep('test_pass', '0000') == 
('sha2560000j7pRjKKZ5L8G0jScZKja9ECmYF2zBV82Mi+E3wkop30=', 'allura_sha256')
 
     
@pytest.mark.parametrize('algorithm,rounds,specific_salt,salt_len,expected_config',
 [
-        ('sha512_crypt', None,None, None, '$6$rounds=656000$'),
-        ('pbkdf2_sha256', None,None, None, '$pbkdf2-sha256$29000$'),
-        ('pbkdf2_sha512', None,None, None, '$pbkdf2-sha512$25000$'),
+        ('sha512_crypt', None, None, None, '$6$rounds=656000$'),
+        ('pbkdf2_sha256', None, None, None, '$pbkdf2-sha256$29000$'),
+        ('pbkdf2_sha512', None, None, None, '$pbkdf2-sha512$25000$'),
         # test with explicit # of rounds & salt_len
         ('pbkdf2_sha512', 26789, None, 50, '$pbkdf2-sha512$26789$'),
         ('bcrypt_sha256', None, 'O'*22, None, '$bcrypt-sha256$v=2,t=2b,r=12$'),
diff --git a/Allura/allura/tests/test_validators.py 
b/Allura/allura/tests/test_validators.py
index d4ca3031b..39d7a68e8 100644
--- a/Allura/allura/tests/test_validators.py
+++ b/Allura/allura/tests/test_validators.py
@@ -127,7 +127,7 @@ class TestAnonymousValidator:
         c.user = M.User.anonymous()
         with pytest.raises(fe.Invalid) as cm:
             self.val.to_python(True)
-        assert str(cm.value) ==  "Log in to Mark as Private"
+        assert str(cm.value) == "Log in to Mark as Private"
 
 
 class TestMountPointValidator:
@@ -210,7 +210,7 @@ class TestTaskValidator:
     def test_import_failure(self):
         with pytest.raises(fe.Invalid) as cm:
             self.val.to_python('allura.does.not.exist')
-        assert str(cm.value) =='Could not import "allura.does.not.exist"'
+        assert str(cm.value) == 'Could not import "allura.does.not.exist"'
 
     def test_attr_lookup_failure(self):
         with pytest.raises(fe.Invalid) as cm:
@@ -329,7 +329,7 @@ class TestIconValidator:
 
     def test_valid(self):
         input = self._mock('foo.png')
-        assert input  == self.val.to_python(input)
+        assert input == self.val.to_python(input)
 
         input = self._mock('foo.jpg')
         assert input == self.val.to_python(input)
diff --git 
a/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py 
b/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
index 388ba955e..2b9a01fff 100644
--- 
a/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
+++ 
b/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
@@ -51,7 +51,7 @@ class TestWhenModerating(WithDatabase):
         post = self.get_post()
         assert post.status == 'ok'
         assert (post.thread.last_post_date.strftime("%Y-%m-%d %H:%M:%S") ==
-                     mod_date.strftime("%Y-%m-%d %H:%M:%S"))
+                mod_date.strftime("%Y-%m-%d %H:%M:%S"))
 
     def test_that_it_can_mark_as_spam(self):
         self.moderate_post(spam=True)
diff --git a/Allura/allura/tests/unit/test_app.py 
b/Allura/allura/tests/unit/test_app.py
index 71b4e95f0..1e41f7a39 100644
--- a/Allura/allura/tests/unit/test_app.py
+++ b/Allura/allura/tests/unit/test_app.py
@@ -124,4 +124,4 @@ def install_app():
     # XXX: Remove project argument to install; it's redundant
     app = Application(project, app_config)
     app.install(project)
-    return app
\ No newline at end of file
+    return app
diff --git a/Allura/allura/tests/unit/test_artifact.py 
b/Allura/allura/tests/unit/test_artifact.py
index bac61bfd7..b8a1477d3 100644
--- a/Allura/allura/tests/unit/test_artifact.py
+++ b/Allura/allura/tests/unit/test_artifact.py
@@ -25,4 +25,4 @@ class TestArtifact:
         fields = {'name_t': '', 'shortname_s': ''}
         query = 'name:1 AND shortname:2 AND shortname_name_field:3'
         q = M.Artifact.translate_query(query, fields)
-        assert q  == 'name_t:1 AND shortname_s:2 AND shortname_name_field:3'
+        assert q == 'name_t:1 AND shortname_s:2 AND shortname_name_field:3'
diff --git a/Allura/allura/tests/unit/test_session.py 
b/Allura/allura/tests/unit/test_session.py
index e69e9737d..884f83f5e 100644
--- a/Allura/allura/tests/unit/test_session.py
+++ b/Allura/allura/tests/unit/test_session.py
@@ -167,7 +167,7 @@ class TestBatchIndexer:
         find.return_value = [m(_id=i) for i in (7, 8, 9)]
         self.ext.update_index(objs_deleted, arefs)
         assert self.ext.to_delete == \
-                         {o.index_id() for o in objs_deleted}
+            {o.index_id() for o in objs_deleted}
         assert self.ext.to_add == {4, 5, 6}
 
         # test deleting something that was previously added
@@ -175,7 +175,7 @@ class TestBatchIndexer:
         find.return_value = [m(_id=4)]
         self.ext.update_index(objs_deleted, [])
         assert self.ext.to_delete == \
-                         {o.index_id() for o in objs_deleted}
+            {o.index_id() for o in objs_deleted}
         assert self.ext.to_add == {5, 6}
 
     @mock.patch('allura.model.session.index_tasks')
diff --git a/Allura/allura/tests/unit/test_solr.py 
b/Allura/allura/tests/unit/test_solr.py
index 42c4643ce..83d6b167f 100644
--- a/Allura/allura/tests/unit/test_solr.py
+++ b/Allura/allura/tests/unit/test_solr.py
@@ -49,7 +49,7 @@ class TestSolr:
         calls = [mock.call('server1', auth=None),
                  mock.call('server2', auth=None),
                  mock.call('server3', auth=None),
-        ]
+                 ]
         pysolr.Solr.assert_has_calls(calls)
         assert len(solr.push_pool) == 2
 
diff --git a/Allura/allura/websetup/bootstrap.py 
b/Allura/allura/websetup/bootstrap.py
index c0e47e6db..18989a0b3 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -304,9 +304,11 @@ def clear_all_database_tables():
                 continue
             db.drop_collection(coll)
 
+
 # this re-uses hashes for the same pwd, which gives a huge speedup during 
tests.  Not good for real usage, since salting is the same.
 user_pwd_hash_speedup_cache = {}
 
+
 def fast_set_pwd(user: M.User, password: str):
     if password in user_pwd_hash_speedup_cache:
         user.password, user.password_algorithm = 
user_pwd_hash_speedup_cache[password]
@@ -315,6 +317,7 @@ def fast_set_pwd(user: M.User, password: str):
         user.set_password(password)
         user_pwd_hash_speedup_cache[password] = (user.password, 
user.password_algorithm)
 
+
 def create_user(display_name, username=None, password='foo', 
make_project=False):  # noqa: S107
     if not username:
         username = display_name.lower().replace(' ', '-')
@@ -328,7 +331,7 @@ def create_user(display_name, username=None, 
password='foo', make_project=False)
     em = EmailAddress.get(**kw)
     em.confirmed = True
     em.set_nonce_hash()
-    user.set_pref('email_address',email)
+    user.set_pref('email_address', email)
     fast_set_pwd(user, password)
     return user
 
diff --git a/Allura/ldap-setup.py b/Allura/ldap-setup.py
index e91343048..428f04078 100644
--- a/Allura/ldap-setup.py
+++ b/Allura/ldap-setup.py
@@ -110,6 +110,7 @@ def tempfile(template, values):
     yield name
     os.remove(name)
 
+
 backend_ldif = string.Template('''
 # Load dynamic backend modules
 dn: cn=module,cn=config
diff --git a/Allura/ldap-userconfig.py b/Allura/ldap-userconfig.py
index dd1c270c0..18fa32384 100644
--- a/Allura/ldap-userconfig.py
+++ b/Allura/ldap-userconfig.py
@@ -55,5 +55,6 @@ def upload(uname, pubkey):
     os.chown(keyfile, u.pw_uid, g.gr_gid)
     os.chmod(keyfile, 0o600)
 
+
 if __name__ == '__main__':
     main()
diff --git a/Allura/setup.py b/Allura/setup.py
index 63613d66a..e32efdeb0 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -26,7 +26,7 @@ lists, wiki pages, blogs and more for any number of 
individual projects.
 '''
 setup(
     name='Allura',
-    version=__version__, # noqa: F821
+    version=__version__,  # noqa: F821
     description='Base distribution of the Allura development platform',
     long_description=PROJECT_DESCRIPTION,
     author='Allura Team',
diff --git a/AlluraTest/alluratest/smtp_debug.py 
b/AlluraTest/alluratest/smtp_debug.py
index 65be0a162..377754bed 100644
--- a/AlluraTest/alluratest/smtp_debug.py
+++ b/AlluraTest/alluratest/smtp_debug.py
@@ -22,4 +22,4 @@ class BetterDebuggingServer(DebuggingServer):
 
     def process_message(self, peer, mailfrom, rcpttos, data, **kwargs):
         print('TO: ' + ', '.join(rcpttos))
-        super().process_message(peer, mailfrom, rcpttos, data)
\ No newline at end of file
+        super().process_message(peer, mailfrom, rcpttos, data)
diff --git a/AlluraTest/alluratest/test_syntax.py 
b/AlluraTest/alluratest/test_syntax.py
index 8124d7684..faebde60d 100644
--- a/AlluraTest/alluratest/test_syntax.py
+++ b/AlluraTest/alluratest/test_syntax.py
@@ -41,4 +41,3 @@ def test_run_precommit():
     code, outputs = run(cmd, dir=os.environ.get('ALLURA_GIT_DIR'))
     if code != 0:
         raise Exception(f'pre-commit failed to run: {outputs[0].decode()} 
{outputs[1].decode()}')
-
diff --git a/ForgeActivity/forgeactivity/tests/functional/test_root.py 
b/ForgeActivity/forgeactivity/tests/functional/test_root.py
index 41d5256f6..8b8443e89 100644
--- a/ForgeActivity/forgeactivity/tests/functional/test_root.py
+++ b/ForgeActivity/forgeactivity/tests/functional/test_root.py
@@ -54,7 +54,7 @@ class TestActivityController(TestController):
     def test_anon_read(self):
         r = self.app.get('/u/test-user-1',
                          extra_environ={'username': '*anonymous'}).follow()
-        assert r.html.select('div.profile-section.tools 
a[href="/u/test-user-1/activity/"]'),\
+        assert r.html.select('div.profile-section.tools 
a[href="/u/test-user-1/activity/"]'), \
             'No Activity tool in top nav'
 
     @td.with_tool('test', 'activity')
diff --git a/ForgeBlog/forgeblog/tests/test_commands.py 
b/ForgeBlog/forgeblog/tests/test_commands.py
index 4a1d797ec..174031c50 100644
--- a/ForgeBlog/forgeblog/tests/test_commands.py
+++ b/ForgeBlog/forgeblog/tests/test_commands.py
@@ -94,7 +94,7 @@ def test_pull_rss_feeds(urlopen):
         <title>Test html summary</title>
         <link href="http://example.com/"/>
         <updated>2003-12-13T18:30:02Z</updated>
-        <summary type="html">'''+ html_in_feed + b'''</summary>
+        <summary type="html">''' + html_in_feed + b'''</summary>
       </entry>
     </feed>''')
 
diff --git a/ForgeBlog/forgeblog/widgets.py b/ForgeBlog/forgeblog/widgets.py
index 3aa74a13d..c0445369c 100644
--- a/ForgeBlog/forgeblog/widgets.py
+++ b/ForgeBlog/forgeblog/widgets.py
@@ -39,7 +39,7 @@ class BlogPostForm(forms.ForgeForm):
         return ew_core.NameList([
             ew.TextField(name='title',
                          validator=v.UnicodeString(not_empty=True,
-                                                     messages={'empty': "You 
must provide a Title"}),
+                                                   messages={'empty': "You 
must provide a Title"}),
                          attrs=dict(placeholder='Enter your title here',
                                     title='Enter your title here',
                                     style='width: 425px')),
diff --git a/ForgeChat/forgechat/model/chat.py 
b/ForgeChat/forgechat/model/chat.py
index 03d1c0905..ba72930b8 100644
--- a/ForgeChat/forgechat/model/chat.py
+++ b/ForgeChat/forgechat/model/chat.py
@@ -93,4 +93,5 @@ class ChatMessage(M.Artifact):
     def timestamp_hour(self):
         return self.timestamp.strftime('%H:%M:%S')
 
+
 Mapper.compile_all()
diff --git a/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py 
b/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
index 1909b6d89..ed461f913 100644
--- a/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
+++ b/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
@@ -95,7 +95,7 @@ class ModerateThread(CsrfForm):
     submit_text = 'Save Changes'
 
     class fields(ew_core.NameList):
-        subject = ew.InputField(label='Change subject:', 
attrs={'style':'width: 50%'})
+        subject = ew.InputField(label='Change subject:', attrs={'style': 
'width: 50%'})
         discussion = _ForumSelector(label='Move to different forum:')
         flags = ew.CheckboxSet(label='Options', options=['Sticky', 
'Announcement'])
 
diff --git a/ForgeFeedback/forgefeedback/feedback_main.py 
b/ForgeFeedback/forgefeedback/feedback_main.py
index 07b937e27..21178ef5f 100644
--- a/ForgeFeedback/forgefeedback/feedback_main.py
+++ b/ForgeFeedback/forgefeedback/feedback_main.py
@@ -131,7 +131,7 @@ class RootController(BaseController, FeedController):
     @expose('jinja:forgefeedback:templates/feedback/index.html')
     def get_review_list(self, **kw):
         self.review_list = Feedback.query.find({'project_id': c.project._id})\
-                            .sort('created_date', pymongo.DESCENDING).all()
+            .sort('created_date', pymongo.DESCENDING).all()
         return self.review_list
 
     """ The new feedback given by the logged in user which includes
@@ -163,8 +163,8 @@ class RootController(BaseController, FeedController):
     @expose('jinja:forgefeedback:templates/feedback/edit_feedback.html')
     def edit_feedback(self, **kw):
         self.review = Feedback.query.find(
-                {'reported_by_id': c.user._id, 'project_id': c.project._id}
-                ).first()
+            {'reported_by_id': c.user._id, 'project_id': c.project._id}
+        ).first()
         return dict(description=self.review.description,
                     rating=self.review.rating)
 
@@ -192,7 +192,7 @@ class RootController(BaseController, FeedController):
     def delete_feedback(self, **kw):
         user_review = Feedback.query.find(
             {'reported_by_id': c.user._id, 'project_id': c.project._id}
-            ).first()
+        ).first()
         if user_review:
             Feedback.query.remove(dict(
                 {'reported_by_id': c.user._id, 'project_id': c.project._id}))
@@ -216,6 +216,7 @@ class RootController(BaseController, FeedController):
 
     """ This method count the number of stars finds their sum and
     calculates the average of all the star rating count """
+
     def getRating(self, **kw):
         onestarcount = TM.Feedback.query.find(
             {'rating': '1', 'project_id': c.project._id}).count()
diff --git a/ForgeFeedback/forgefeedback/tests/functional/test_root.py 
b/ForgeFeedback/forgefeedback/tests/functional/test_root.py
index b751eb7a3..902a5199f 100644
--- a/ForgeFeedback/forgefeedback/tests/functional/test_root.py
+++ b/ForgeFeedback/forgefeedback/tests/functional/test_root.py
@@ -20,7 +20,6 @@ from allura import model as M
 from alluratest.controller import TestController
 
 
-
 class TestFeedback(TestController):
 
     def test_feedback(self):
diff --git a/ForgeFeedback/setup.py b/ForgeFeedback/setup.py
index 241608e89..196098a9a 100644
--- a/ForgeFeedback/setup.py
+++ b/ForgeFeedback/setup.py
@@ -47,7 +47,3 @@ setup(name='ForgeFeedback',
 
       """,
       )
-
-
-
-
diff --git a/ForgeFiles/forgefiles/files_main.py 
b/ForgeFiles/forgefiles/files_main.py
index 7c91a6896..9279014e1 100755
--- a/ForgeFiles/forgefiles/files_main.py
+++ b/ForgeFiles/forgefiles/files_main.py
@@ -88,7 +88,6 @@ class FilesApp(Application):
 
 
 def get_parent_folders(linked_file_object=None):
-
     '''Returns the list of the parent folders for the current file or folder'''
 
     parent_folder = linked_file_object.parent_folder if linked_file_object 
else None
@@ -108,7 +107,6 @@ class FilesController(BaseController):
 
     @expose('jinja:forgefiles:templates/files.html')
     def index(self):
-
         '''Index method for the Root controller'''
 
         require_access(c.app, 'read')
@@ -136,7 +134,6 @@ class FilesController(BaseController):
                     subscribed=subscribed, parents=parents)
 
     def get_parent_folder_url(self, parent_folder_id):
-
         ''' Returns the url,parent_folder and id of parent_folder object if 
object is there'''
 
         if (parent_folder_id == 'None') or (not parent_folder_id):
@@ -152,7 +149,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def create_folder(self, parent_folder_id=None, folder_name=None):
-
         '''Controller method for creating a folder. The folder is stored in 
UploadFolder collection'''
 
         require_access(c.app, 'create')
@@ -179,7 +175,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def upload_file(self, parent_folder_id=None, file_upload=None, 
filename=None):
-
         '''Controller method for creating a folder. The folder is stored in 
UploadFolder collection'''
 
         require_access(c.app, 'create')
@@ -212,7 +207,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def delete_file(self, file_id=None):
-
         '''Controller method to delete a file'''
 
         file_object = UploadFiles.query.get(_id=ObjectId(file_id), 
app_config_id=c.app.config._id)
@@ -233,7 +227,6 @@ class FilesController(BaseController):
         return redirect(url)
 
     def delete_file_from_db(self, file_id=None):
-
         '''Method to delete a file from db'''
 
         file_object = UploadFiles.query.get(_id=ObjectId(file_id), 
app_config_id=c.app.config._id)
@@ -241,7 +234,6 @@ class FilesController(BaseController):
         file_object.delete()
 
     def delete_folder_recursively(self, folder_id):
-
         '''This method is called recursively to delete folder in a hierarchy'''
 
         sub_file_objects = UploadFiles.query.find(dict({
@@ -258,7 +250,6 @@ class FilesController(BaseController):
     @require_post()
     @expose('jinja:forgefiles:templates/files.html')
     def delete_folder(self, folder_id=None):
-
         '''Controller method to delete a folder'''
 
         folder_object = UploadFolder.query.get(_id=ObjectId(folder_id), 
app_config_id=c.app.config._id)
@@ -280,7 +271,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def link_file(self, file_id=None, status=None):
-
         '''Controller method to link a file to the download button'''
 
         linkable_file_object = UploadFiles.query.get(_id=ObjectId(file_id), 
app_config_id=c.app.config._id)
@@ -297,7 +287,6 @@ class FilesController(BaseController):
 
     @expose()
     def download_file(self, filename=None):
-
         '''Controller method to download a file'''
 
         if filename:
@@ -324,7 +313,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def edit_folder(self, folder_id=None, folder_name=None):
-
         '''Controller method to edit the folder name'''
 
         url = c.app.url
@@ -342,7 +330,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def edit_file(self, file_id=None, file_name=None):
-
         '''Controller method to edit the file name'''
 
         url = c.app.url
@@ -362,7 +349,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def publish_folder(self, folder_id=None, remarks=None):
-
         '''Controller which publishes the folder. It send update about the 
publishing of the folder.'''
 
         folder_object = UploadFolder.query.get(_id=ObjectId(folder_id), 
app_config_id=c.app.config._id)
@@ -409,7 +395,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def disable_folder(self, folder_id=None, status=None):
-
         '''Controller method to disable the folder.'''
 
         folder_object = UploadFolder.query.get(_id=ObjectId(folder_id), 
app_config_id=c.app.config._id)
@@ -440,7 +425,6 @@ class FilesController(BaseController):
     @require_post()
     @expose()
     def disable_file(self, file_id=None, status=None):
-
         '''Controller method to disable the file.'''
 
         file_object = UploadFiles.query.get(_id=ObjectId(file_id), 
app_config_id=c.app.config._id)
@@ -461,7 +445,6 @@ class FilesController(BaseController):
     @expose('json:')
     @require_post()
     def subscribe(self, subscribe=None, unsubscribe=None):
-
         '''Controller method that subscribes an user to the files plugin.'''
 
         if subscribe:
diff --git a/ForgeFiles/forgefiles/model/files.py 
b/ForgeFiles/forgefiles/model/files.py
index 43d0af0af..ee421a4b9 100755
--- a/ForgeFiles/forgefiles/model/files.py
+++ b/ForgeFiles/forgefiles/model/files.py
@@ -146,7 +146,6 @@ class UploadFiles(File):
     thumbnail_size = (255, 255)
     ArtifactType = Upload
 
-
     class __mongometa__:
         name = 'upload_files'
         session = project_orm_session
@@ -181,13 +180,11 @@ class UploadFiles(File):
 
     @property
     def artifact(self):
-
         '''Returns the Artifact object'''
 
         return self.ArtifactType.query.get(_id=self.artifact_id)
 
     def url(self):
-
         '''Returns the URL of the uploaded file'''
 
         parent_folder = self.parent_folder
diff --git a/ForgeFiles/forgefiles/tests/__init__.py 
b/ForgeFiles/forgefiles/tests/__init__.py
index 77505f1c3..144e29886 100644
--- a/ForgeFiles/forgefiles/tests/__init__.py
+++ b/ForgeFiles/forgefiles/tests/__init__.py
@@ -14,4 +14,3 @@
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
 #       under the License.
-
diff --git a/ForgeFiles/forgefiles/tests/functional/__init__.py 
b/ForgeFiles/forgefiles/tests/functional/__init__.py
index 77505f1c3..144e29886 100644
--- a/ForgeFiles/forgefiles/tests/functional/__init__.py
+++ b/ForgeFiles/forgefiles/tests/functional/__init__.py
@@ -14,4 +14,3 @@
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
 #       under the License.
-
diff --git a/ForgeFiles/forgefiles/tests/functional/test_root.py 
b/ForgeFiles/forgefiles/tests/functional/test_root.py
index fb38b7924..445590270 100644
--- a/ForgeFiles/forgefiles/tests/functional/test_root.py
+++ b/ForgeFiles/forgefiles/tests/functional/test_root.py
@@ -132,7 +132,7 @@ def upload_file(self):
     path = dir.write('myfile.txt', b'Testing Upload')
     with open(path, 'rb') as f:
         file_upload = [('file_upload', 'myfile.txt', f.read())]
-        filename_dict = {'filename':'myfile.txt'}
+        filename_dict = {'filename': 'myfile.txt'}
         self.app.post('/p/test/files/upload_file', filename_dict, 
upload_files=file_upload)
     file_object = UploadFiles.query.get(filename='myfile.txt')
     dir.cleanup()
diff --git a/ForgeFiles/forgefiles/tests/model/__init__.py 
b/ForgeFiles/forgefiles/tests/model/__init__.py
index 820aea361..1b0a08cb6 100644
--- a/ForgeFiles/forgefiles/tests/model/__init__.py
+++ b/ForgeFiles/forgefiles/tests/model/__init__.py
@@ -48,4 +48,3 @@ class FilesTestWithModel:
 
     def teardown_method(self, method):
         ThreadLocalODMSession.close_all()
-
diff --git a/ForgeGit/forgegit/tests/test_tasks.py 
b/ForgeGit/forgegit/tests/test_tasks.py
index 48ab369bd..96297b3bf 100644
--- a/ForgeGit/forgegit/tests/test_tasks.py
+++ b/ForgeGit/forgegit/tests/test_tasks.py
@@ -99,4 +99,3 @@ class TestCoreAlluraTasks(GitRealDataBaseTestCase):
 
         # mostly just making sure nothing errored, but here's at least one 
thing we can assert:
         assert repo.status == 'ready'
-
diff --git a/ForgeImporters/forgeimporters/forge/discussion.py 
b/ForgeImporters/forgeimporters/forge/discussion.py
index 61db6253d..50dd9d0b6 100644
--- a/ForgeImporters/forgeimporters/forge/discussion.py
+++ b/ForgeImporters/forgeimporters/forge/discussion.py
@@ -68,10 +68,10 @@ class ForgeDiscussionImportController(ToolImportController):
     def create(self, discussions_json, mount_point, mount_label, **kw):
         if self.importer.enforce_limit(c.project):
             save_importer_upload(
-                            c.project,
-                            'discussions.json',
-                            json.dumps(discussions_json)
-                        )
+                c.project,
+                'discussions.json',
+                json.dumps(discussions_json)
+            )
             self.importer.post(mount_point=mount_point, 
mount_label=mount_label)
             flash('Discussion import has begun. Your new discussion will be 
available when the import is complete')
         else:
@@ -113,15 +113,15 @@ class ForgeDiscussionImporter(AlluraImporter):
                 for forum_json in discussion_json['forums']:
 
                     new_forum = dict(
-                                    app_config_id=app.config._id,
-                                    shortname=forum_json['shortname'],
-                                    description=forum_json['description'],
-                                    name=forum_json['name'],
-                                    create='on',
-                                    parent='',
-                                    members_only=False,
-                                    anon_posts=False,
-                                    monitoring_email=None,
+                        app_config_id=app.config._id,
+                        shortname=forum_json['shortname'],
+                        description=forum_json['description'],
+                        name=forum_json['name'],
+                        create='on',
+                        parent='',
+                        members_only=False,
+                        anon_posts=False,
+                        monitoring_email=None,
                     )
 
                     forum = utils.create_forum(app, new_forum=new_forum)
@@ -194,19 +194,19 @@ class ForgeDiscussionImporter(AlluraImporter):
                                 break
 
                 p = thread.add_post(
-                        subject=post_json['subject'],
-                        text=self.annotate_text(post_json['text'], user, 
username),
-                        timestamp=timestamp,
-                        ignore_security=True,
-                        parent_id=parent_id
+                    subject=post_json['subject'],
+                    text=self.annotate_text(post_json['text'], user, username),
+                    timestamp=timestamp,
+                    ignore_security=True,
+                    parent_id=parent_id
                 )
 
                 if ("last_edited" in post_json) and (post_json["last_edited"] 
is not None):
                     p.last_edit_date = parse(post_json["last_edited"])
 
                 p.add_multiple_attachments(
-                        [File(a["url"]) for a in post_json["attachments"]]
-                    )
+                    [File(a["url"]) for a in post_json["attachments"]]
+                )
 
                 if slug != '':
                     created_posts.append({slug: p})
diff --git a/ForgeImporters/forgeimporters/github/tests/test_utils.py 
b/ForgeImporters/forgeimporters/github/tests/test_utils.py
index f8c45cd02..c2ace0429 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_utils.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_utils.py
@@ -51,7 +51,7 @@ class TestGitHubMarkdownConverter:
         text = 'user/p@16c999e8c71134401a78d4d46435517b2271d6ac'
         result = self.conv.convert(text)
         assert (result == '[user/p@16c999]'
-                             
'(https://github.com/user/p/commit/16c999e8c71134401a78d4d46435517b2271d6ac)')
+                
'(https://github.com/user/p/commit/16c999e8c71134401a78d4d46435517b2271d6ac)')
 
     def test_convert_ticket(self):
         text = 'Ticket #1'
diff --git a/ForgeImporters/forgeimporters/github/tests/test_wiki.py 
b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
index 647b1b2d5..d3b53dbda 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_wiki.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
@@ -15,7 +15,7 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
-from unittest import  skipIf
+from unittest import skipIf
 from mock import Mock, patch, call
 from ming.odm import ThreadLocalODMSession
 import git
diff --git a/ForgeImporters/forgeimporters/tests/forge/test_discussion.py 
b/ForgeImporters/forgeimporters/tests/forge/test_discussion.py
index 70464f5e5..bcbed57e6 100644
--- a/ForgeImporters/forgeimporters/tests/forge/test_discussion.py
+++ b/ForgeImporters/forgeimporters/tests/forge/test_discussion.py
@@ -113,19 +113,19 @@ class TestDiscussionImporter:
 
         utils.create_forum.assert_called_once_with(app, new_forum=new_forum)
         forum.get_discussion_thread(
-              
dict(headers=dict(Subject=_json["forums"][0]["threads"][0]["subject"])))
+            
dict(headers=dict(Subject=_json["forums"][0]["threads"][0]["subject"])))
         importer.add_posts.assert_called_once_with(
-                                    thread1,
-                                    _json["forums"][0]["threads"][0]["posts"],
-                                    app
+            thread1,
+            _json["forums"][0]["threads"][0]["posts"],
+            app
         )
 
         m.AuditLog.log.assert_called_once_with(
-                        "import tool mount_point from exported Allura JSON",
-                        project=project,
-                        user=user,
-                        url='foo'
-                    )
+            "import tool mount_point from exported Allura JSON",
+            project=project,
+            user=user,
+            url='foo'
+        )
         g.post_event.assert_called_once_with("project_updated")
 
     @mock.patch.object(discussion, 'c')
@@ -160,10 +160,10 @@ class TestDiscussionImporter:
                             "slug": "0e0e",
                             "subject": "post with 
un\u00ef\u00e7\u00f8\u2202\u00e9"
                         }],
-                        "page": None,
-                        "subject": "post with un\u00ef\u00e7\u00f8\u2202\u00e9"
-                    }]
+                    "page": None,
+                    "subject": "post with un\u00ef\u00e7\u00f8\u2202\u00e9"
                 }]
+            }]
         }
 
         importer._load_json = mock.Mock(return_value=_json)
@@ -202,7 +202,7 @@ class TestDiscussionImporter:
         utils.create_forum.assert_called_once_with(app, new_forum=new_forum)
         forum.get_discussion_thread.assert_called_once_with(dict(
             headers=dict(Subject=_json["forums"][0]["threads"][0]["subject"])
-            ))
+        ))
 
         importer.get_user.assert_called_once_with('admin1')
 
@@ -220,9 +220,9 @@ class TestDiscussionImporter:
             parent_id=None
         )
         importer.annotate_text.assert_called_once_with(
-                post["text"],
-                admin,
-                post["author"]
+            post["text"],
+            admin,
+            post["author"]
         )
         p.add_multiple_attachments.assert_called_once_with([])
 
@@ -332,29 +332,29 @@ class TestDiscussionImporter:
                             "subject": "Thread0",
                             "posts": []
                         },
-                        {
+                    {
                             "page": None,
                             "subject": "Thread1",
                             "posts": []
-                        },
-                        {
+                            },
+                    {
                             "page": None,
                             "subject": "Thread2",
                             "posts": []
-                        },
-                        {
+                            },
+                    {
                             "page": None,
                             "subject": "Thread3",
                             "posts": []
-                        },
-                        {
+                            },
+                    {
                             "page": None,
                             "subject": "Thread4",
                             "posts": []
-                        }
-                    ]}
-                ]
-            }
+                            }
+                ]}
+            ]
+        }
 
         importer._load_json = mock.Mock(return_value=_json)
         importer.add_posts = mock.Mock()
@@ -380,10 +380,10 @@ class TestDiscussionImporter:
         importer.import_tool(project, user, 'mount_point', 'mount_label')
 
         project.install_app.assert_called_once_with(
-                'discussion',
-                'mount_point',
-                'mount_label',
-                import_id={'source': 'Allura'}
+            'discussion',
+            'mount_point',
+            'mount_label',
+            import_id={'source': 'Allura'}
         )
         h.push_config.assert_called_once_with(c, app=app)
 
@@ -422,7 +422,7 @@ class TestDiscussionImporter:
                 "name": "General Discussion",
                 "import_id": import_id,
                 "threads": []
-                }]
+            }]
         }
 
         importer._load_json = mock.Mock(return_value=_json)
@@ -492,8 +492,8 @@ class TestDiscussionImporter:
                         "posts": [],
                         "subject": "Thread",
                         "import_id": import_id
-                    }]
                 }]
+            }]
         }
 
         importer._load_json = mock.Mock(return_value=_json)
@@ -532,8 +532,8 @@ class TestDiscussionImporter:
                         "limit": None,
                         "posts": [],
                         "subject": "Thread",
-                    }]
                 }]
+            }]
         }
 
         importer._load_json = mock.Mock(return_value=_json)
@@ -635,7 +635,7 @@ class TestDiscussionImporter:
                 "description": "Description of forum",
                 "name": "General Discussion",
                 "threads": [{
-                   "posts": []
+                    "posts": []
                 }]
             }]
         }
@@ -680,11 +680,11 @@ class TestDiscussionImporter:
         importer.get_user.assert_called_once_with('admin1')
         h.push_config.assert_called_once_with(c, user=user, app=app)
         thread.add_post.assert_called_once_with(
-                subject=_json[0]['subject'],
-                text='foo',
-                timestamp=parse(_json[0]['timestamp']),
-                ignore_security=True,
-                parent_id=None
+            subject=_json[0]['subject'],
+            text='foo',
+            timestamp=parse(_json[0]['timestamp']),
+            ignore_security=True,
+            parent_id=None
         )
         post.add_multiple_attachments.assert_called_once_with([])
 
@@ -937,54 +937,54 @@ class TestDiscussionImporter:
 
         _json = [
             {
-              "attachments": [],
-              "author": "admin1",
-              "timestamp": "2020-01-29 22:39:31.483000",
-              "text": "hi",
-              "slug": "0d1d",
-              "subject": "topic with lots of replies"
+                "attachments": [],
+                "author": "admin1",
+                "timestamp": "2020-01-29 22:39:31.483000",
+                "text": "hi",
+                "slug": "0d1d",
+                "subject": "topic with lots of replies"
             },
             {
-              "attachments": [],
-              "author": "admin1",
-              "timestamp": "2020-01-29 22:39:43.525000",
-              "text": "hello",
-              "slug": "0d1d/d421",
-              "subject": "topic with lots of replies"
+                "attachments": [],
+                "author": "admin1",
+                "timestamp": "2020-01-29 22:39:43.525000",
+                "text": "hello",
+                "slug": "0d1d/d421",
+                "subject": "topic with lots of replies"
             },
             {
-              "attachments": [],
-              "author": "admin1",
-              "timestamp": "2020-01-29 22:39:50.086000",
-              "text": "goodbye",
-              "slug": "0d1d/d421/f37d",
-              "subject": "topic with lots of replies"
+                "attachments": [],
+                "author": "admin1",
+                "timestamp": "2020-01-29 22:39:50.086000",
+                "text": "goodbye",
+                "slug": "0d1d/d421/f37d",
+                "subject": "topic with lots of replies"
             },
             {
-              "attachments": [],
-              "author": "admin1",
-              "timestamp": "2020-01-29 22:42:13.740000",
-              "text": "hi again",
-              "slug": "012f",
-              "subject": "topic with lots of replies"
+                "attachments": [],
+                "author": "admin1",
+                "timestamp": "2020-01-29 22:42:13.740000",
+                "text": "hi again",
+                "slug": "012f",
+                "subject": "topic with lots of replies"
             },
             {
-              "attachments": [],
-              "author": "user02",
-              "timestamp": "2020-01-29 22:42:51.645000",
-              "text": "hi there",
-              "slug": "012f/211a",
-              "subject": "topic with lots of replies"
+                "attachments": [],
+                "author": "user02",
+                "timestamp": "2020-01-29 22:42:51.645000",
+                "text": "hi there",
+                "slug": "012f/211a",
+                "subject": "topic with lots of replies"
             },
             {
-              "attachments": [],
-              "author": "user02",
-              "timestamp": "2020-01-29 22:42:58.478000",
-              "text": "hi here",
-              "slug": "0d1d/00a0",
-              "subject": "topic with lots of replies"
+                "attachments": [],
+                "author": "user02",
+                "timestamp": "2020-01-29 22:42:58.478000",
+                "text": "hi here",
+                "slug": "0d1d/00a0",
+                "subject": "topic with lots of replies"
             }
-         ]
+        ]
 
         importer.add_posts(thread, _json, app)
 
diff --git a/ForgeImporters/forgeimporters/tests/forge/test_tracker.py 
b/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
index 7cb5e1741..9f5bff000 100644
--- a/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
@@ -299,7 +299,7 @@ class TestTrackerImporter:
         importer.process_comments(ticket, comments)
 
         assert importer.get_user.call_args_list == \
-                         [mock.call('a1'), mock.call('a2')]
+            [mock.call('a1'), mock.call('a2')]
         assert importer.annotate.call_args_list == [
             mock.call('t1', author, 'a1'),
             mock.call('t2', author, 'a2'),
@@ -341,7 +341,7 @@ class TestForgeTrackerImportController(TestController):
         super().setup_method(method)
         from forgetracker.tracker_main import TrackerAdminController
         TrackerAdminController._importer = \
-                
tracker.ForgeTrackerImportController(tracker.ForgeTrackerImporter())
+            
tracker.ForgeTrackerImportController(tracker.ForgeTrackerImporter())
 
     @with_tracker
     def test_index(self):
diff --git 
a/ForgeImporters/forgeimporters/tests/github/functional/test_github.py 
b/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
index d9ed29b8f..be2e77130 100644
--- a/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
+++ b/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
@@ -91,7 +91,6 @@ class TestGitHubOAuth(TestController):
                                                         json={'access_token': 
'abc'},
                                                         timeout=10)
 
-
     def test_project_import_login_required(self):
         r = self.app.get('/p/import_project/github/', 
extra_environ=dict(username='*anonymous'))
         assert r.location is None
diff --git a/ForgeImporters/forgeimporters/tests/github/test_tracker.py 
b/ForgeImporters/forgeimporters/tests/github/test_tracker.py
index 70164494c..28c3a4e74 100644
--- a/ForgeImporters/forgeimporters/tests/github/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/github/test_tracker.py
@@ -97,7 +97,7 @@ class TestTrackerImporter:
             importer.process_fields(extractor, ticket, issue)
             assert ticket.summary == 'title'
             assert ticket.description == \
-                             '*Originally created by:* 
[creator](https://github.com/creator)\n*Originally owned by:* 
[owner](https://github.com/owner)\n\nhello'
+                '*Originally created by:* 
[creator](https://github.com/creator)\n*Originally owned by:* 
[owner](https://github.com/owner)\n\nhello'
             assert ticket.status == 'New'
             assert ticket.created_date == 'created_at'
             assert ticket.mod_date == 'updated_at'
diff --git a/ForgeImporters/forgeimporters/tests/test_base.py 
b/ForgeImporters/forgeimporters/tests/test_base.py
index 7467613c9..022c36c23 100644
--- a/ForgeImporters/forgeimporters/tests/test_base.py
+++ b/ForgeImporters/forgeimporters/tests/test_base.py
@@ -150,7 +150,7 @@ class TestProjectImporter:
         pi = base.ProjectImporter(mock.Mock(name='neighborhood'))
         pi.source = 'foo'
         assert pi.tool_importers == \
-                         {'ep1': eps[0].lv, 'ep3': eps[2].lv}
+            {'ep1': eps[0].lv, 'ep3': eps[2].lv}
         iep.assert_called_once_with('allura.importers')
 
     @mock.patch.object(base.ToolImporter, 'by_name')
@@ -307,7 +307,7 @@ class TestToolsValidator:
         with pytest.raises(Invalid) as cm:
             self.tv.to_python(['value1', 'value2', 'value3'])
         assert cm.value.msg == \
-                         'Invalid tools selected: value1, value3'
+            'Invalid tools selected: value1, value3'
         assert by_name.call_args_list == [
             mock.call('value1'),
             mock.call('value2'),
diff --git a/ForgeImporters/forgeimporters/trac/tests/test_tickets.py 
b/ForgeImporters/forgeimporters/trac/tests/test_tickets.py
index 9cdadba1c..5da9166a1 100644
--- a/ForgeImporters/forgeimporters/trac/tests/test_tickets.py
+++ b/ForgeImporters/forgeimporters/trac/tests/test_tickets.py
@@ -18,7 +18,7 @@
 import json
 import os
 
-from unittest import  skipIf
+from unittest import skipIf
 
 import pytest
 from mock import Mock, patch
@@ -142,9 +142,9 @@ class TestTracTicketImportController(TestController):
         assert \
             'mylabel' == import_tool.post.call_args[1]['mount_label']
         assert '{"orig_user": "new_user"}' == \
-                         import_tool.post.call_args[1]['user_map']
+            import_tool.post.call_args[1]['user_map']
         assert 'http://example.com/trac/url/' == \
-                         import_tool.post.call_args[1]['trac_url']
+            import_tool.post.call_args[1]['trac_url']
 
     @with_tracker
     @patch('forgeimporters.trac.requests.head')
@@ -192,6 +192,7 @@ class TestTracTicketImportController(TestController):
         r = self.app.post('/p/test/admin/ext/import/trac-tickets/create', 
params, status=200)
         assert 'Invalid URL' in r.text
 
+
 class TestTracImportSupport:
 
     def test_link_processing(self):
@@ -288,7 +289,7 @@ class TestTracImportSupportFunctional(TestRestApiBase):
         ticket = TM.Ticket.query.get(app_config_id=c.app.config._id,
                                      ticket_num=390)
         assert 'To reproduce:  \n\\- open an mzML file' in \
-                      ticket.description
+            ticket.description
         assert 'duplicate of:  \n\\- [#316](316 "defect: SpectraViewWidget is' 
in \
-                      ticket.discussion_thread.find_posts()[0].text
+            ticket.discussion_thread.find_posts()[0].text
         assert 'will crash TOPPView.' in ticket.description
diff --git a/ForgeSVN/forgesvn/tests/functional/test_auth.py 
b/ForgeSVN/forgesvn/tests/functional/test_auth.py
index 7a64dc229..b235d7688 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_auth.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_auth.py
@@ -39,7 +39,7 @@ class TestSVNAuth(TestController):
 
         r = self.app.get('/auth/refresh_repo/p/test/src/')
         assert (r.text ==
-                     '<Repository /tmp/svn/p/test/src> refresh queued.\n')
+                '<Repository /tmp/svn/p/test/src> refresh queued.\n')
 
 
 class TestSVNUserPermissions(TestController):
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py 
b/ForgeSVN/forgesvn/tests/model/test_repository.py
index f1e95c18e..631deea82 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -217,7 +217,7 @@ class TestSVNRepo(RepoImplTestBase):
             os.path.join(g.tmpdir, 'testsvn/hooks/post-commit'), os.X_OK)
         with open(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit')) as f:
             c = f.read()
-        assert  'curl -s http://localhost/auth/refresh_repo/p/test/src/\n' in c
+        assert 'curl -s http://localhost/auth/refresh_repo/p/test/src/\n' in c
         assert 'exec $DIR/post-commit-user "$@"\n' in c
 
         repo.refresh(notify=False)
diff --git a/ForgeTracker/forgetracker/import_support.py 
b/ForgeTracker/forgetracker/import_support.py
index abfe426bd..8c3ae4252 100644
--- a/ForgeTracker/forgetracker/import_support.py
+++ b/ForgeTracker/forgetracker/import_support.py
@@ -220,7 +220,7 @@ class ImportSupport:
             owner = '*Originally owned by:* {}\n'.format(
                     h.really_unicode(ticket_dict['assigned_to']))
         remapped['description'] = '{}{}{}{}'.format(creator, owner,
-                                                         '\n' if creator or 
owner else '', description)
+                                                    '\n' if creator or owner 
else '', description)
 
         ticket_num = ticket_dict['id']
         existing_ticket = TM.Ticket.query.get(app_config_id=c.app.config._id,
diff --git a/ForgeTracker/forgetracker/search.py 
b/ForgeTracker/forgetracker/search.py
index d215cc631..4c6ed7838 100644
--- a/ForgeTracker/forgetracker/search.py
+++ b/ForgeTracker/forgetracker/search.py
@@ -41,7 +41,7 @@ def query_filter_choices(arg=None, fq=[]):
             'project_id_s:%s' % c.project._id,
             'mount_point_s:%s' % c.app.config.options.mount_point,
             'type_s:Ticket',
-            ] + fq,
+        ] + fq,
         'rows': 0,
     }
     params.update(FACET_PARAMS)
diff --git a/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py 
b/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
index f580797fb..2f886a01f 100644
--- a/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
+++ b/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
@@ -230,7 +230,7 @@ class TestTicketModel(TrackerTestWithModel):
         assert f.pubdate == datetime(2012, 10, 29, 9, 57, 21, 465000)
         assert f.title == 'test ticket'
         assert (f.description ==
-                     '<div class="markdown_content"><p>test 
description</p></div>')
+                '<div class="markdown_content"><p>test description</p></div>')
 
     @td.with_tool('test', 'Tickets', 'bugs', username='test-user')
     @td.with_tool('test', 'Tickets', 'bugs2', username='test-user')
diff --git a/ForgeTracker/forgetracker/widgets/ticket_search.py 
b/ForgeTracker/forgetracker/widgets/ticket_search.py
index effa98f3b..e14ebf7da 100644
--- a/ForgeTracker/forgetracker/widgets/ticket_search.py
+++ b/ForgeTracker/forgetracker/widgets/ticket_search.py
@@ -22,7 +22,6 @@ from allura.lib.widgets import form_fields as ffw
 from allura.lib.widgets import forms
 
 
-
 class TicketSearchResults(ew_core.SimpleForm):
     template = 
'jinja:forgetracker:templates/tracker_widgets/ticket_search_results.html'
     defaults = dict(
diff --git a/ForgeUserStats/forgeuserstats/tests/test_model.py 
b/ForgeUserStats/forgeuserstats/tests/test_model.py
index 9842cc642..fe2aa759e 100644
--- a/ForgeUserStats/forgeuserstats/tests/test_model.py
+++ b/ForgeUserStats/forgeuserstats/tests/test_model.py
@@ -472,10 +472,10 @@ class TestUserStats:
         )
         stats.addCommit(newcommit, commit_datetime, project)
         assert stats.general[0].commits[0] == \
-                         {'lines': 3, 'number': 1, 'language': None}
+            {'lines': 3, 'number': 1, 'language': None}
         unified_diff.reset_mock()
         with h.push_config(config, **{'userstats.count_lines_of_code': 
'false'}):
             stats.addCommit(newcommit, commit_datetime, project)
         assert stats.general[0].commits[0] == \
-                         {'lines': 3, 'number': 2, 'language': None}
+            {'lines': 3, 'number': 2, 'language': None}
         assert not unified_diff.called
diff --git a/ForgeWiki/forgewiki/model/wiki.py 
b/ForgeWiki/forgewiki/model/wiki.py
index 5b6d0e682..712857eaf 100644
--- a/ForgeWiki/forgewiki/model/wiki.py
+++ b/ForgeWiki/forgewiki/model/wiki.py
@@ -297,4 +297,5 @@ class WikiAttachment(BaseAttachment):
 
     attachment_type = FieldProperty(str, if_missing='WikiAttachment')
 
+
 Mapper.compile_all()
diff --git a/ForgeWiki/forgewiki/tests/test_models.py 
b/ForgeWiki/forgewiki/tests/test_models.py
index 9a70504f2..58fa3cb28 100644
--- a/ForgeWiki/forgewiki/tests/test_models.py
+++ b/ForgeWiki/forgewiki/tests/test_models.py
@@ -42,6 +42,7 @@ class TestPageSnapshots(TestController):
         page.commit()
 
         lock = Lock()
+
         def run(n):
             setup_global_objects()
             for i in range(10):
diff --git a/conftest.py b/conftest.py
index 020af6a93..b4fc8ce7a 100644
--- a/conftest.py
+++ b/conftest.py
@@ -17,6 +17,8 @@
 import pytest
 
 # should get rid of this once this issue is fixed 
https://github.com/TurboGears/tg2/issues/136
+
+
 @pytest.fixture(autouse=True, scope='session')
 def tg_context_patch():
     from tg import (
@@ -37,4 +39,3 @@ def tg_context_patch():
     translator.__dict__['_is_coroutine'] = False
     url.__dict__['_is_coroutine'] = False
     config.__dict__['_is_coroutine'] = False
-                      
\ No newline at end of file
diff --git a/scripts/changelog.py b/scripts/changelog.py
index 6d4c2a7e9..d5e01456f 100755
--- a/scripts/changelog.py
+++ b/scripts/changelog.py
@@ -74,5 +74,6 @@ def print_changelog(version, summaries, 
changes_without_tickets):
     for change in changes_without_tickets:
         print(f" * {six.ensure_text(change)}")
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/013-update-ordinals.py 
b/scripts/migrations/013-update-ordinals.py
index 666696327..8bdeff1eb 100644
--- a/scripts/migrations/013-update-ordinals.py
+++ b/scripts/migrations/013-update-ordinals.py
@@ -69,5 +69,6 @@ def main():
         ThreadLocalODMSession.flush_all()
         ThreadLocalODMSession.close_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/015-add-neighborhood_id-to-blog-posts.py 
b/scripts/migrations/015-add-neighborhood_id-to-blog-posts.py
index 88d324e74..83c3dea01 100644
--- a/scripts/migrations/015-add-neighborhood_id-to-blog-posts.py
+++ b/scripts/migrations/015-add-neighborhood_id-to-blog-posts.py
@@ -34,5 +34,6 @@ def main():
         ThreadLocalODMSession.flush_all()
     ThreadLocalODMSession.close_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/020-remove-wiki-title-slashes.py 
b/scripts/migrations/020-remove-wiki-title-slashes.py
index 08b1bb6f9..99d192aed 100644
--- a/scripts/migrations/020-remove-wiki-title-slashes.py
+++ b/scripts/migrations/020-remove-wiki-title-slashes.py
@@ -35,5 +35,6 @@ def main():
         print('Updated: %s' % page.title)
     ThreadLocalODMSession.flush_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/022-change-anon-display-name.py 
b/scripts/migrations/022-change-anon-display-name.py
index 2d43cacbf..6c007cc5d 100644
--- a/scripts/migrations/022-change-anon-display-name.py
+++ b/scripts/migrations/022-change-anon-display-name.py
@@ -26,5 +26,6 @@ def main():
     ThreadLocalODMSession.flush_all()
     ThreadLocalODMSession.close_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/024-migrate-custom-profile-text.py 
b/scripts/migrations/024-migrate-custom-profile-text.py
index de480c89d..b859756ed 100644
--- a/scripts/migrations/024-migrate-custom-profile-text.py
+++ b/scripts/migrations/024-migrate-custom-profile-text.py
@@ -80,5 +80,6 @@ def main():
 
         ThreadLocalODMSession.flush_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/025-add-is-nbhd-project.py 
b/scripts/migrations/025-add-is-nbhd-project.py
index ca3fc77bb..0f29c284b 100644
--- a/scripts/migrations/025-add-is-nbhd-project.py
+++ b/scripts/migrations/025-add-is-nbhd-project.py
@@ -28,5 +28,6 @@ def main():
     M.Project.query.update({'shortname': {'$ne': '--init--'}},
                            {'$set': {'is_nbhd_project': False}}, multi=True)
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/026-install-activity-tool.py 
b/scripts/migrations/026-install-activity-tool.py
index 94eb6b31c..38024c50d 100644
--- a/scripts/migrations/026-install-activity-tool.py
+++ b/scripts/migrations/026-install-activity-tool.py
@@ -33,5 +33,6 @@ def main():
         ThreadLocalODMSession.flush_all()
         ThreadLocalODMSession.close_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/027-change-ticket-write-permissions.py 
b/scripts/migrations/027-change-ticket-write-permissions.py
index 6878f7add..3d8483f21 100644
--- a/scripts/migrations/027-change-ticket-write-permissions.py
+++ b/scripts/migrations/027-change-ticket-write-permissions.py
@@ -49,5 +49,6 @@ def main():
 
         ThreadLocalODMSession.flush_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/028-remove-svn-trees.py 
b/scripts/migrations/028-remove-svn-trees.py
index 1cc12b1ac..13d368a26 100644
--- a/scripts/migrations/028-remove-svn-trees.py
+++ b/scripts/migrations/028-remove-svn-trees.py
@@ -51,5 +51,6 @@ def main():
                 ThreadLocalODMSession.flush_all()
                 ThreadLocalODMSession.close_all()
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/029-set-mailbox-queue_empty.py 
b/scripts/migrations/029-set-mailbox-queue_empty.py
index c2075b71c..3a50b3c04 100644
--- a/scripts/migrations/029-set-mailbox-queue_empty.py
+++ b/scripts/migrations/029-set-mailbox-queue_empty.py
@@ -31,5 +31,6 @@ def main():
                            {'$set': {'queue_empty': False}},
                            multi=True)
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/migrations/031-set-user-pending-to-false.py 
b/scripts/migrations/031-set-user-pending-to-false.py
index edb755a2c..e1482b63c 100644
--- a/scripts/migrations/031-set-user-pending-to-false.py
+++ b/scripts/migrations/031-set-user-pending-to-false.py
@@ -35,5 +35,6 @@ def main():
             state(user).status = state(user).dirty
             ThreadLocalODMSession.flush_all()
 
+
 if __name__ == '__main__':
     main()
diff --git 
a/scripts/migrations/034-update_subscriptions_ticket_and_mr_titles.py 
b/scripts/migrations/034-update_subscriptions_ticket_and_mr_titles.py
index 7e3dc1c3e..dc2ee9971 100644
--- a/scripts/migrations/034-update_subscriptions_ticket_and_mr_titles.py
+++ b/scripts/migrations/034-update_subscriptions_ticket_and_mr_titles.py
@@ -47,7 +47,7 @@ def main():
             continue
         new_title = 'Ticket #%d: %s' % (ticket.ticket_num, ticket.summary)
         log.info('"%s" --> "%s"', sub.artifact_title, new_title)
-        if(task != 'diff'):
+        if (task != 'diff'):
             sub.artifact_title = new_title
         session(sub).flush(sub)
 
diff --git a/scripts/perf/load-up-forum.py b/scripts/perf/load-up-forum.py
index 91338dec1..1b63a632d 100644
--- a/scripts/perf/load-up-forum.py
+++ b/scripts/perf/load-up-forum.py
@@ -61,7 +61,7 @@ def main():
             p = thd.post(subject, 'a new topic 2')
 
             for j in range(randint(1, 5)):
-                new_post = {'text':'comment text'}
+                new_post = {'text': 'comment text'}
                 # post = thd.add_post(**new_post)
                 post = thd.add_post(text='comment text for real', 
subject="test subject")
 
diff --git a/scripts/perf/sstress.py b/scripts/perf/sstress.py
index a24f3d009..9cd0dc934 100644
--- a/scripts/perf/sstress.py
+++ b/scripts/perf/sstress.py
@@ -52,5 +52,6 @@ def stress():
     for x in range(N / C):
         server.sendmail('sstress@localhost', TOADDR, EMAIL_TEXT)
 
+
 if __name__ == '__main__':
     main()
diff --git a/scripts/perf/test_git_lcd.py b/scripts/perf/test_git_lcd.py
index 4dadee6c1..d27576343 100644
--- a/scripts/perf/test_git_lcd.py
+++ b/scripts/perf/test_git_lcd.py
@@ -48,5 +48,6 @@ def main(repo_dir, sub_dir='', commit=None):
     pprint(result)
     print("Took %f seconds" % timer['result'])
 
+
 if __name__ == '__main__':
     main(*sys.argv[1:])

Reply via email to