]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Comparison to true should be 'if cond is true:' or 'if cond:' (E712)
authorMichael Fritch <mfritch@suse.com>
Thu, 28 Jan 2021 18:57:16 +0000 (11:57 -0700)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 23 Feb 2021 09:58:23 +0000 (10:58 +0100)
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 5136f4b1d0e6426fc8d3b2b2004ba32b58f211d3)

src/pybind/mgr/cephadm/tests/test_cephadm.py
src/pybind/mgr/cephadm/tests/test_spec.py
src/pybind/mgr/tox.ini

index 79e344b138bab321741925e53082bee2f56281f7..6aa72b2ac67ebe00079b12a2e6beeb156b8a6610 100644 (file)
@@ -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',
@@ -873,7 +873,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'')
index 5f80ddf797eeaa44a1e964f245bdae2712da12f7..586344bee9b51d66a88a0022866cd38b81a1dd86 100644 (file)
@@ -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"
index d7f799c8202ed9dd98fbf6b0ed73aec829da2656..b9da10b32d717278884225afb99313f77818523d 100644 (file)
@@ -12,7 +12,6 @@ requires = cython
 max-line-length = 100
 ignore =
     E501,
-    E712,
     E722,
     E731,
     E741,