Fix flake8 error: E117 over-indented
Change-Id: I07f6bbccfa00844281475e3d94b0f5d10e397b9e
This commit is contained in:
parent
91e7e680a1
commit
363d881ab9
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
|
@ -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…
Reference in New Issue