From: Michael Fritch Date: Thu, 28 Jan 2021 18:57:16 +0000 (-0700) Subject: mgr/cephadm: Comparison to true should be 'if cond is true:' or 'if cond:' (E712) X-Git-Tag: v17.1.0~3027^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5136f4b1d0e6426fc8d3b2b2004ba32b58f211d3;p=ceph.git mgr/cephadm: Comparison to true should be 'if cond is true:' or 'if cond:' (E712) Signed-off-by: Michael Fritch --- diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index 4fc21ebc63cc..fe1d53366267 100644 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@ -417,7 +417,7 @@ class TestCephadm(object): _run_cephadm.return_value = (['{}'], '', 0) - assert CephadmServe(cephadm_module)._apply_all_services() == False + assert CephadmServe(cephadm_module)._apply_all_services() is False _run_cephadm.assert_any_call( 'test', 'osd', 'ceph-volume', @@ -857,7 +857,7 @@ class TestCephadm(object): with with_host(cephadm_module, 'test'): cephadm_module.set_module_option('manage_etc_ceph_ceph_conf', True) cephadm_module.config_notify() - assert cephadm_module.manage_etc_ceph_ceph_conf == True + assert cephadm_module.manage_etc_ceph_ceph_conf is True CephadmServe(cephadm_module)._refresh_hosts_and_daemons() _check.assert_called_with(ANY, ['dd', 'of=/etc/ceph/ceph.conf'], stdin=b'') diff --git a/src/pybind/mgr/cephadm/tests/test_spec.py b/src/pybind/mgr/cephadm/tests/test_spec.py index 5f80ddf797ee..586344bee9b5 100644 --- a/src/pybind/mgr/cephadm/tests/test_spec.py +++ b/src/pybind/mgr/cephadm/tests/test_spec.py @@ -692,9 +692,9 @@ spec: assert spec.virtual_ip_address == "192.168.20.1/24" assert spec.frontend_port == 8080 assert spec.ha_proxy_port == 1967 - assert spec.ha_proxy_stats_enabled == True + assert spec.ha_proxy_stats_enabled is True assert spec.ha_proxy_stats_user == "admin" assert spec.ha_proxy_stats_password == "admin" - assert spec.ha_proxy_enable_prometheus_exporter == True + assert spec.ha_proxy_enable_prometheus_exporter is True assert spec.ha_proxy_monitor_uri == "/haproxy_health" assert spec.keepalived_password == "admin" diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 79513623d1b1..109bb26964c2 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -12,7 +12,6 @@ requires = cython max-line-length = 100 ignore = E501, - E712, E722, E731, E741,