diff --git a/kallithea/controllers/api/api.py b/kallithea/controllers/api/api.py --- a/kallithea/controllers/api/api.py +++ b/kallithea/controllers/api/api.py @@ -1321,7 +1321,7 @@ class ApiController(JSONRPCController): if (name != repo.repo_name and not HasPermissionAny('hg.create.repository')() - ): + ): raise JSONRPCError('no permission to create (or move) repositories') if not isinstance(owner, Optional): diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -206,7 +206,7 @@ def create_cs_pr_comment(repo_name, revi h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionLevel('admin')(pull_request.org_repo.repo_name) or h.HasRepoPermissionLevel('admin')(pull_request.other_repo.repo_name) - ) and not pull_request.is_closed(): + ) and not pull_request.is_closed(): PullRequestModel().delete(pull_request) Session().commit() h.flash(_('Successfully deleted pull request %s') % pull_request_id, diff --git a/kallithea/lib/annotate.py b/kallithea/lib/annotate.py --- a/kallithea/lib/annotate.py +++ b/kallithea/lib/annotate.py @@ -90,7 +90,8 @@ class AnnotateHtmlFormatter(HtmlFormatte self.order = order or ('ls', 'annotate', 'code') headers = options.pop('headers', None) if headers and not ('ls' in headers and 'annotate' in headers and - 'code' in headers): + 'code' in headers + ): raise ValueError("If headers option dict is specified it must " "all 'ls', 'annotate' and 'code' keys") self.headers = headers diff --git a/kallithea/lib/middleware/simplegit.py b/kallithea/lib/middleware/simplegit.py --- a/kallithea/lib/middleware/simplegit.py +++ b/kallithea/lib/middleware/simplegit.py @@ -86,7 +86,7 @@ class SimpleGit(BaseVCSController): def wrapper_app(environ, start_response): if (parsed_request.cmd == 'info/refs' and parsed_request.service == 'git-upload-pack' - ): + ): baseui = make_ui() repo = Repository.get_by_repo_name(parsed_request.repo_name) scm_repo = repo.scm_instance diff --git a/kallithea/lib/page.py b/kallithea/lib/page.py --- a/kallithea/lib/page.py +++ b/kallithea/lib/page.py @@ -126,7 +126,8 @@ class Page(_Page): symbol_previous='<', symbol_next='>', link_attr=None, curpage_attr=None, - dotdot_attr=None, **kwargs): + dotdot_attr=None, **kwargs + ): self.curpage_attr = curpage_attr or {'class': 'active'} self.separator = separator self.pager_kwargs = kwargs diff --git a/kallithea/lib/utils2.py b/kallithea/lib/utils2.py --- a/kallithea/lib/utils2.py +++ b/kallithea/lib/utils2.py @@ -304,7 +304,8 @@ def age(prevdate, show_short_version=Fal month_lengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] if deltas['day'] < 0: if prevdate.month == 2 and (prevdate.year % 4 == 0 and - (prevdate.year % 100 != 0 or prevdate.year % 400 == 0)): + (prevdate.year % 100 != 0 or prevdate.year % 400 == 0) + ): deltas['day'] += 29 else: deltas['day'] += month_lengths[prevdate.month - 1] diff --git a/kallithea/lib/vcs/backends/git/inmemory.py b/kallithea/lib/vcs/backends/git/inmemory.py --- a/kallithea/lib/vcs/backends/git/inmemory.py +++ b/kallithea/lib/vcs/backends/git/inmemory.py @@ -95,7 +95,8 @@ class GitInMemoryChangeset(BaseInMemoryC new_trees.append(parent) # Update ancestors for parent, tree, path in reversed([(a[1], b[1], b[0]) for a, b in - zip(ancestors, ancestors[1:])]): + zip(ancestors, ancestors[1:])] + ): parent[path] = stat.S_IFDIR, tree.id object_store.add_object(tree) diff --git a/kallithea/lib/vcs/utils/annotate.py b/kallithea/lib/vcs/utils/annotate.py --- a/kallithea/lib/vcs/utils/annotate.py +++ b/kallithea/lib/vcs/utils/annotate.py @@ -62,7 +62,8 @@ class AnnotateHtmlFormatter(HtmlFormatte self.order = order or ('ls', 'annotate', 'code') headers = options.pop('headers', None) if headers and not ('ls' in headers and 'annotate' in headers and - 'code' in headers): + 'code' in headers + ): raise ValueError("If headers option dict is specified it must " "all 'ls', 'annotate' and 'code' keys") self.headers = headers