Browse Source

Fix flake8 error: E117 over-indented

Change-Id: I07f6bbccfa00844281475e3d94b0f5d10e397b9e
tags/3.6.0
Benedikt Loeffler 5 months ago
parent
commit
363d881ab9

+ 3
- 3
zuul/driver/gerrit/gerritmodel.py View File

@@ -88,14 +88,14 @@ class GerritApprovalFilter(object):
88 88
         for k, v in rapproval.items():
89 89
             if k == 'username':
90 90
                 if (not v.search(by.get('username', ''))):
91
-                        return False
91
+                    return False
92 92
             elif k == 'email':
93 93
                 if (not v.search(by.get('email', ''))):
94
-                        return False
94
+                    return False
95 95
             elif k == 'newer-than':
96 96
                 t = now - v
97 97
                 if (approval['grantedOn'] < t):
98
-                        return False
98
+                    return False
99 99
             elif k == 'older-than':
100 100
                 t = now - v
101 101
                 if (approval['grantedOn'] >= t):

+ 3
- 3
zuul/driver/github/githubmodel.py View File

@@ -108,14 +108,14 @@ class GithubCommonFilter(object):
108 108
         for k, v in rreview.items():
109 109
             if k == 'username':
110 110
                 if (not v.search(by.get('username', ''))):
111
-                        return False
111
+                    return False
112 112
             elif k == 'email':
113 113
                 if (not v.search(by.get('email', ''))):
114
-                        return False
114
+                    return False
115 115
             elif k == 'newer-than':
116 116
                 t = now - v
117 117
                 if (review['grantedOn'] < t):
118
-                        return False
118
+                    return False
119 119
             elif k == 'older-than':
120 120
                 t = now - v
121 121
                 if (review['grantedOn'] >= t):

+ 2
- 2
zuul/driver/github/githubreporter.py View File

@@ -157,12 +157,12 @@ class GithubReporter(BaseReporter):
157 157
             self.log.debug('Reporting change %s, params %s, labels:\n%s' %
158 158
                            (item.change, self.config, self._labels))
159 159
         for label in self._labels:
160
-                self.connection.labelPull(project, pr_number, label)
160
+            self.connection.labelPull(project, pr_number, label)
161 161
         if self._unlabels:
162 162
             self.log.debug('Reporting change %s, params %s, unlabels:\n%s' %
163 163
                            (item.change, self.config, self._unlabels))
164 164
         for label in self._unlabels:
165
-                self.connection.unlabelPull(project, pr_number, label)
165
+            self.connection.unlabelPull(project, pr_number, label)
166 166
 
167 167
     def _formatMergeMessage(self, change):
168 168
         message = ''

+ 9
- 9
zuul/executor/server.py View File

@@ -548,15 +548,15 @@ class DeduplicateQueue(object):
548 548
 
549 549
 
550 550
 def _copy_ansible_files(python_module, target_dir):
551
-        library_path = os.path.dirname(os.path.abspath(python_module.__file__))
552
-        for fn in os.listdir(library_path):
553
-            if fn == "__pycache__":
554
-                continue
555
-            full_path = os.path.join(library_path, fn)
556
-            if os.path.isdir(full_path):
557
-                shutil.copytree(full_path, os.path.join(target_dir, fn))
558
-            else:
559
-                shutil.copy(os.path.join(library_path, fn), target_dir)
551
+    library_path = os.path.dirname(os.path.abspath(python_module.__file__))
552
+    for fn in os.listdir(library_path):
553
+        if fn == "__pycache__":
554
+            continue
555
+        full_path = os.path.join(library_path, fn)
556
+        if os.path.isdir(full_path):
557
+            shutil.copytree(full_path, os.path.join(target_dir, fn))
558
+        else:
559
+            shutil.copy(os.path.join(library_path, fn), target_dir)
560 560
 
561 561
 
562 562
 def check_varnames(var):

Loading…
Cancel
Save