diff --git a/lib/ansible/executor/task_result.py b/lib/ansible/executor/task_result.py index c3f1a7ce348..eba18fa337d 100644 --- a/lib/ansible/executor/task_result.py +++ b/lib/ansible/executor/task_result.py @@ -88,7 +88,7 @@ class TaskResult: ret = True elif _debugger in ('on_unreachable',) and self.is_unreachable(): ret = True - elif _debugger in('on_skipped',) and self.is_skipped(): + elif _debugger in ('on_skipped',) and self.is_skipped(): ret = True return ret diff --git a/lib/ansible/playbook/role/requirement.py b/lib/ansible/playbook/role/requirement.py index 3a206befc75..640840f9bb6 100644 --- a/lib/ansible/playbook/role/requirement.py +++ b/lib/ansible/playbook/role/requirement.py @@ -108,7 +108,7 @@ class RoleRequirement(RoleDefinition): else: role = role.copy() - if 'src'in role: + if 'src' in role: # New style: { src: 'galaxy.role,version,name', other_vars: "here" } if 'github.com' in role["src"] and 'http' in role["src"] and '+' not in role["src"] and not role["src"].endswith('.tar.gz'): role["src"] = "git+" + role["src"] diff --git a/test/units/module_utils/parsing/test_convert_bool.py b/test/units/module_utils/parsing/test_convert_bool.py index ed8fd7f0ed5..fc1a973ca35 100644 --- a/test/units/module_utils/parsing/test_convert_bool.py +++ b/test/units/module_utils/parsing/test_convert_bool.py @@ -48,13 +48,13 @@ class TestBoolean: def test_junk_values_strict(self): with pytest.raises(TypeError): - assert boolean("flibbity", strict=True)is False + assert boolean("flibbity", strict=True) is False with pytest.raises(TypeError): - assert boolean(42, strict=True)is False + assert boolean(42, strict=True) is False with pytest.raises(TypeError): - assert boolean(42.0, strict=True)is False + assert boolean(42.0, strict=True) is False with pytest.raises(TypeError): - assert boolean(object(), strict=True)is False + assert boolean(object(), strict=True) is False diff --git a/test/units/module_utils/urls/test_fetch_url.py b/test/units/module_utils/urls/test_fetch_url.py index 5d289199543..9cac2a35e4b 100644 --- a/test/units/module_utils/urls/test_fetch_url.py +++ b/test/units/module_utils/urls/test_fetch_url.py @@ -157,7 +157,7 @@ def test_fetch_url_nossl(open_url_mock, fake_ansible_module, mocker): fetch_url(fake_ansible_module, 'http://ansible.com/') assert 'python-ssl' in excinfo.value.kwargs['msg'] - assert'http://ansible.com/' == excinfo.value.kwargs['url'] + assert 'http://ansible.com/' == excinfo.value.kwargs['url'] assert excinfo.value.kwargs['status'] == -1 @@ -167,7 +167,7 @@ def test_fetch_url_connectionerror(open_url_mock, fake_ansible_module): fetch_url(fake_ansible_module, 'http://ansible.com/') assert excinfo.value.kwargs['msg'] == 'TESTS' - assert'http://ansible.com/' == excinfo.value.kwargs['url'] + assert 'http://ansible.com/' == excinfo.value.kwargs['url'] assert excinfo.value.kwargs['status'] == -1 open_url_mock.side_effect = ValueError('TESTS') @@ -175,7 +175,7 @@ def test_fetch_url_connectionerror(open_url_mock, fake_ansible_module): fetch_url(fake_ansible_module, 'http://ansible.com/') assert excinfo.value.kwargs['msg'] == 'TESTS' - assert'http://ansible.com/' == excinfo.value.kwargs['url'] + assert 'http://ansible.com/' == excinfo.value.kwargs['url'] assert excinfo.value.kwargs['status'] == -1