mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-22 12:50:42 +00:00
fix linting
This commit is contained in:
parent
f70f0ca1f1
commit
3c822b4525
@ -17,7 +17,7 @@ class CheckWhenFormat(StandardBase):
|
|||||||
|
|
||||||
if not errors:
|
if not errors:
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
if 'when' in task and not self._is_valid(task['when']):
|
if "when" in task and not self._is_valid(task["when"]):
|
||||||
errors.append(self.Error(task["__line__"], self.helptext))
|
errors.append(self.Error(task["__line__"], self.helptext))
|
||||||
|
|
||||||
return self.Result(candidate.path, errors)
|
return self.Result(candidate.path, errors)
|
||||||
@ -26,4 +26,4 @@ class CheckWhenFormat(StandardBase):
|
|||||||
def _is_valid(when):
|
def _is_valid(when):
|
||||||
if not isinstance(when, str):
|
if not isinstance(when, str):
|
||||||
return True
|
return True
|
||||||
return when.find('{{') == -1 and when.find('}}') == -1
|
return when.find("{{") == -1 and when.find("}}") == -1
|
||||||
|
Loading…
Reference in New Issue
Block a user