Fix flake8 error: E117 over-indented

Change-Id: I07f6bbccfa00844281475e3d94b0f5d10e397b9e
This commit is contained in:
Benedikt Loeffler 2019-01-30 16:08:36 +01:00
parent 91e7e680a1
commit 363d881ab9
4 changed files with 17 additions and 17 deletions

View File

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

View File

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

View File

@ -157,12 +157,12 @@ class GithubReporter(BaseReporter):
self.log.debug('Reporting change %s, params %s, labels:\n%s' % self.log.debug('Reporting change %s, params %s, labels:\n%s' %
(item.change, self.config, self._labels)) (item.change, self.config, self._labels))
for label in self._labels: for label in self._labels:
self.connection.labelPull(project, pr_number, label) self.connection.labelPull(project, pr_number, label)
if self._unlabels: if self._unlabels:
self.log.debug('Reporting change %s, params %s, unlabels:\n%s' % self.log.debug('Reporting change %s, params %s, unlabels:\n%s' %
(item.change, self.config, self._unlabels)) (item.change, self.config, self._unlabels))
for label in 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): def _formatMergeMessage(self, change):
message = '' message = ''

View File

@ -548,15 +548,15 @@ class DeduplicateQueue(object):
def _copy_ansible_files(python_module, target_dir): def _copy_ansible_files(python_module, target_dir):
library_path = os.path.dirname(os.path.abspath(python_module.__file__)) library_path = os.path.dirname(os.path.abspath(python_module.__file__))
for fn in os.listdir(library_path): for fn in os.listdir(library_path):
if fn == "__pycache__": if fn == "__pycache__":
continue continue
full_path = os.path.join(library_path, fn) full_path = os.path.join(library_path, fn)
if os.path.isdir(full_path): if os.path.isdir(full_path):
shutil.copytree(full_path, os.path.join(target_dir, fn)) shutil.copytree(full_path, os.path.join(target_dir, fn))
else: else:
shutil.copy(os.path.join(library_path, fn), target_dir) shutil.copy(os.path.join(library_path, fn), target_dir)
def check_varnames(var): def check_varnames(var):