diff --git a/kallithea/bin/kallithea_cli_repo.py b/kallithea/bin/kallithea_cli_repo.py --- a/kallithea/bin/kallithea_cli_repo.py +++ b/kallithea/bin/kallithea_cli_repo.py @@ -133,7 +133,8 @@ def repo_purge_deleted(ask, older_than): 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): diff --git a/kallithea/controllers/changelog.py b/kallithea/controllers/changelog.py --- a/kallithea/controllers/changelog.py +++ b/kallithea/controllers/changelog.py @@ -88,7 +88,8 @@ class ChangelogController(BaseRepoContro 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 '')) diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -98,7 +98,8 @@ class PullrequestsController(BaseRepoCon 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) diff --git a/kallithea/lib/db_manage.py b/kallithea/lib/db_manage.py --- a/kallithea/lib/db_manage.py +++ b/kallithea/lib/db_manage.py @@ -237,8 +237,8 @@ class DbManage(object): ('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 diff --git a/kallithea/lib/vcs/backends/git/repository.py b/kallithea/lib/vcs/backends/git/repository.py --- a/kallithea/lib/vcs/backends/git/repository.py +++ b/kallithea/lib/vcs/backends/git/repository.py @@ -278,7 +278,8 @@ class GitRepository(BaseRepository): 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: diff --git a/kallithea/lib/vcs/subprocessio.py b/kallithea/lib/vcs/subprocessio.py --- a/kallithea/lib/vcs/subprocessio.py +++ b/kallithea/lib/vcs/subprocessio.py @@ -367,13 +367,15 @@ class SubprocessIOChunker(object): # 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 @@ class SubprocessIOChunker(object): 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) diff --git a/kallithea/model/pull_request.py b/kallithea/model/pull_request.py --- a/kallithea/model/pull_request.py +++ b/kallithea/model/pull_request.py @@ -172,7 +172,8 @@ class CreatePullRequestAction(object): 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