changeset 7824:548357c4301d

flake8: fix E117 over-indented
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 04 Aug 2019 01:39:04 +0200
parents d8efd9270441
children fcfc62767107
files kallithea/controllers/api/__init__.py kallithea/controllers/api/api.py kallithea/lib/utils2.py kallithea/lib/vcs/backends/git/repository.py kallithea/lib/vcs/utils/progressbar.py kallithea/model/validators.py
diffstat 6 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/api/__init__.py	Sun Aug 04 01:23:57 2019 +0200
+++ b/kallithea/controllers/api/__init__.py	Sun Aug 04 01:39:04 2019 +0200
@@ -196,11 +196,11 @@
 
         extra = set(self._request_params).difference(func_kwargs)
         if extra:
-                raise JSONRPCErrorResponse(
-                    retid=self._req_id,
-                    message='Unknown %s arg in JSON DATA' %
-                            ', '.join('`%s`' % arg for arg in extra),
-                )
+            raise JSONRPCErrorResponse(
+                retid=self._req_id,
+                message='Unknown %s arg in JSON DATA' %
+                        ', '.join('`%s`' % arg for arg in extra),
+            )
 
         self._rpc_args = {}
         self._rpc_args.update(self._request_params)
--- a/kallithea/controllers/api/api.py	Sun Aug 04 01:23:57 2019 +0200
+++ b/kallithea/controllers/api/api.py	Sun Aug 04 01:39:04 2019 +0200
@@ -2354,9 +2354,9 @@
 
         with_reviews = Optional.extract(with_reviews)
         if with_reviews:
-                reviews = ChangesetStatusModel().get_statuses(
-                                    repo.repo_name, raw_id)
-                info["reviews"] = reviews
+            reviews = ChangesetStatusModel().get_statuses(
+                                repo.repo_name, raw_id)
+            info["reviews"] = reviews
 
         return info
 
--- a/kallithea/lib/utils2.py	Sun Aug 04 01:23:57 2019 +0200
+++ b/kallithea/lib/utils2.py	Sun Aug 04 01:39:04 2019 +0200
@@ -100,13 +100,13 @@
     from string import replace
 
     if mode == 0:
-            line = replace(line, '\r\n', '\n')
-            line = replace(line, '\r', '\n')
+        line = replace(line, '\r\n', '\n')
+        line = replace(line, '\r', '\n')
     elif mode == 1:
-            line = replace(line, '\r\n', '\r')
-            line = replace(line, '\n', '\r')
+        line = replace(line, '\r\n', '\r')
+        line = replace(line, '\n', '\r')
     elif mode == 2:
-            line = re.sub("\r(?!\n)|(?<!\r)\n", "\r\n", line)
+        line = re.sub("\r(?!\n)|(?<!\r)\n", "\r\n", line)
     return line
 
 
--- a/kallithea/lib/vcs/backends/git/repository.py	Sun Aug 04 01:23:57 2019 +0200
+++ b/kallithea/lib/vcs/backends/git/repository.py	Sun Aug 04 01:39:04 2019 +0200
@@ -316,7 +316,7 @@
     def _get_archives(self, archive_name='tip'):
 
         for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]:
-                yield {"type": i[0], "extension": i[1], "node": archive_name}
+            yield {"type": i[0], "extension": i[1], "node": archive_name}
 
     def _get_url(self, url):
         """
--- a/kallithea/lib/vcs/utils/progressbar.py	Sun Aug 04 01:23:57 2019 +0200
+++ b/kallithea/lib/vcs/utils/progressbar.py	Sun Aug 04 01:39:04 2019 +0200
@@ -357,8 +357,8 @@
     print "Standard progress bar..."
     bar = ProgressBar(30)
     for x in xrange(1, 31):
-            bar.render(x)
-            time.sleep(0.02)
+        bar.render(x)
+        time.sleep(0.02)
     bar.stream.write('\n')
     print
 
--- a/kallithea/model/validators.py	Sun Aug 04 01:23:57 2019 +0200
+++ b/kallithea/model/validators.py	Sun Aug 04 01:39:04 2019 +0200
@@ -365,17 +365,17 @@
                             error_dict=dict(repo_name=msg)
                         )
                 elif repo_group is not None:
-                        msg = self.message('same_group_exists', state,
-                                repo=repo_name)
-                        raise formencode.Invalid(msg, value, state,
-                            error_dict=dict(repo_name=msg)
-                        )
+                    msg = self.message('same_group_exists', state,
+                            repo=repo_name)
+                    raise formencode.Invalid(msg, value, state,
+                        error_dict=dict(repo_name=msg)
+                    )
                 elif repo is not None:
-                        msg = self.message('repository_exists', state,
-                                repo=repo.repo_name)
-                        raise formencode.Invalid(msg, value, state,
-                            error_dict=dict(repo_name=msg)
-                        )
+                    msg = self.message('repository_exists', state,
+                            repo=repo.repo_name)
+                    raise formencode.Invalid(msg, value, state,
+                        error_dict=dict(repo_name=msg)
+                    )
             return value
     return _validator