From 5136f4b1d0e6426fc8d3b2b2004ba32b58f211d3 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 28 Jan 2021 11:57:16 -0700 Subject: [PATCH] mgr/cephadm: Comparison to true should be 'if cond is true:' or 'if cond:' (E712) Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/tests/test_cephadm.py | 4 ++-- src/pybind/mgr/cephadm/tests/test_spec.py | 4 ++-- src/pybind/mgr/tox.ini | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index 4fc21ebc63cc3..fe1d53366267a 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 5f80ddf797eea..586344bee9b51 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 79513623d1b19..109bb26964c27 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, -- 2.39.5