Browse Source

Fix flake8 error: E117 over-indented

Change-Id: I07f6bbccfa00844281475e3d94b0f5d10e397b9e
tags/3.6.0
Benedikt Loeffler 10 months ago
parent
commit
363d881ab9
4 changed files with 17 additions and 17 deletions
  1. +3
    -3
      zuul/driver/gerrit/gerritmodel.py
  2. +3
    -3
      zuul/driver/github/githubmodel.py
  3. +2
    -2
      zuul/driver/github/githubreporter.py
  4. +9
    -9
      zuul/executor/server.py

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

@@ -88,14 +88,14 @@ class GerritApprovalFilter(object):
for k, v in rapproval.items():
if k == 'username':
if (not v.search(by.get('username', ''))):
return False
return False
elif k == 'email':
if (not v.search(by.get('email', ''))):
return False
return False
elif k == 'newer-than':
t = now - v
if (approval['grantedOn'] < t):
return False
return False
elif k == 'older-than':
t = now - v
if (approval['grantedOn'] >= t):

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

@@ -108,14 +108,14 @@ class GithubCommonFilter(object):
for k, v in rreview.items():
if k == 'username':
if (not v.search(by.get('username', ''))):
return False
return False
elif k == 'email':
if (not v.search(by.get('email', ''))):
return False
return False
elif k == 'newer-than':
t = now - v
if (review['grantedOn'] < t):
return False
return False
elif k == 'older-than':
t = now - v
if (review['grantedOn'] >= t):

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

@@ -157,12 +157,12 @@ class GithubReporter(BaseReporter):
self.log.debug('Reporting change %s, params %s, labels:\n%s' %
(item.change, self.config, self._labels))
for label in self._labels:
self.connection.labelPull(project, pr_number, label)
self.connection.labelPull(project, pr_number, label)
if self._unlabels:
self.log.debug('Reporting change %s, params %s, unlabels:\n%s' %
(item.change, self.config, self._unlabels))
for label in self._unlabels:
self.connection.unlabelPull(project, pr_number, label)
self.connection.unlabelPull(project, pr_number, label)

def _formatMergeMessage(self, change):
message = ''

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

@@ -548,15 +548,15 @@ class DeduplicateQueue(object):


def _copy_ansible_files(python_module, target_dir):
library_path = os.path.dirname(os.path.abspath(python_module.__file__))
for fn in os.listdir(library_path):
if fn == "__pycache__":
continue
full_path = os.path.join(library_path, fn)
if os.path.isdir(full_path):
shutil.copytree(full_path, os.path.join(target_dir, fn))
else:
shutil.copy(os.path.join(library_path, fn), target_dir)
library_path = os.path.dirname(os.path.abspath(python_module.__file__))
for fn in os.listdir(library_path):
if fn == "__pycache__":
continue
full_path = os.path.join(library_path, fn)
if os.path.isdir(full_path):
shutil.copytree(full_path, os.path.join(target_dir, fn))
else:
shutil.copy(os.path.join(library_path, fn), target_dir)


def check_varnames(var):

Loading…
Cancel
Save