changeset 7825:fcfc62767107

flake8: fix E129 visually indented line with same indent as next logical line
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 04 Aug 2019 01:29:11 +0200
parents 548357c4301d
children f73a1103ccdc
files kallithea/bin/kallithea_cli_repo.py kallithea/controllers/changelog.py kallithea/controllers/pullrequests.py kallithea/lib/db_manage.py kallithea/lib/vcs/backends/git/repository.py kallithea/lib/vcs/subprocessio.py kallithea/model/pull_request.py
diffstat 7 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/bin/kallithea_cli_repo.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/bin/kallithea_cli_repo.py	Sun Aug 04 01:29:11 2019 +0200
@@ -133,7 +133,8 @@
         if ('.hg' in alldirs or
             '.git' in alldirs or
             '.svn' in alldirs or
-            'objects' in alldirs and ('refs' in alldirs or 'packed-refs' in f)):
+            'objects' in alldirs and ('refs' in alldirs or 'packed-refs' in f)
+        ):
             continue
         for loc in alldirs:
             if REMOVED_REPO_PAT.match(loc):
--- a/kallithea/controllers/changelog.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/controllers/changelog.py	Sun Aug 04 01:29:11 2019 +0200
@@ -88,7 +88,8 @@
         if (branch_name and
             branch_name not in c.db_repo_scm_instance.branches and
             branch_name not in c.db_repo_scm_instance.closed_branches and
-            not revision):
+            not revision
+        ):
             raise HTTPFound(location=url('changelog_file_home', repo_name=c.repo_name,
                                     revision=branch_name, f_path=f_path or ''))
 
--- a/kallithea/controllers/pullrequests.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/controllers/pullrequests.py	Sun Aug 04 01:29:11 2019 +0200
@@ -98,7 +98,8 @@
             peerbranches = set()
             for i in repo._repo.revs(
                 "sort(parents(branch(id(%s)) and merge()) - branch(id(%s)), -rev)",
-                branch_rev, branch_rev):
+                branch_rev, branch_rev
+            ):
                 for abranch in repo.get_changeset(i).branches:
                     if abranch not in peerbranches:
                         n = 'branch:%s:%s' % (abranch, repo.get_changeset(abranch).raw_id)
--- a/kallithea/lib/db_manage.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/lib/db_manage.py	Sun Aug 04 01:29:11 2019 +0200
@@ -237,8 +237,8 @@
             ('default_repo_enable_downloads', False, 'bool'),
             ('default_repo_enable_statistics', False, 'bool'),
             ('default_repo_private', False, 'bool'),
-            ('default_repo_type', 'hg', 'unicode')]:
-
+            ('default_repo_type', 'hg', 'unicode')
+        ]:
             if skip_existing and Setting.get_by_name(k) is not None:
                 log.debug('Skipping option %s', k)
                 continue
--- a/kallithea/lib/vcs/backends/git/repository.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/lib/vcs/backends/git/repository.py	Sun Aug 04 01:29:11 2019 +0200
@@ -278,7 +278,8 @@
 
         is_bstr = isinstance(revision, (str, unicode))
         if ((is_bstr and revision.isdigit() and len(revision) < 12)
-            or isinstance(revision, int) or is_null(revision)):
+            or isinstance(revision, int) or is_null(revision)
+        ):
             try:
                 revision = self.revisions[int(revision)]
             except IndexError:
--- a/kallithea/lib/vcs/subprocessio.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/lib/vcs/subprocessio.py	Sun Aug 04 01:29:11 2019 +0200
@@ -367,13 +367,15 @@
         # Else, we are happy.
         returncode = _p.poll()
         if (returncode is not None # process has terminated
-            and returncode != 0): # and it failed
+            and returncode != 0
+        ): # and it failed
             bg_out.stop()
             out = ''.join(bg_out)
             bg_err.stop()
             err = ''.join(bg_err)
             if (err.strip() == 'fatal: The remote end hung up unexpectedly' and
-                out.startswith('0034shallow ')):
+                out.startswith('0034shallow ')
+            ):
                 # hack inspired by https://github.com/schacon/grack/pull/7
                 bg_out = iter([out])
                 _p = None
@@ -395,7 +397,8 @@
         if self.process:
             returncode = self.process.poll()
             if (returncode is not None # process has terminated
-                and returncode != 0): # and it failed
+                and returncode != 0
+            ): # and it failed
                 self.output.stop()
                 self.error.stop()
                 err = ''.join(self.error)
--- a/kallithea/model/pull_request.py	Sun Aug 04 01:39:04 2019 +0200
+++ b/kallithea/model/pull_request.py	Sun Aug 04 01:29:11 2019 +0200
@@ -172,7 +172,8 @@
         object.
         """
         if (h.HasRepoPermissionLevel('read')(org_repo.repo_name) and
-            h.HasRepoPermissionLevel('read')(other_repo.repo_name)):
+            h.HasRepoPermissionLevel('read')(other_repo.repo_name)
+        ):
             return True
 
         return False