]> git.apps.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)
committerMichael Fritch <mfritch@suse.com>
Fri, 5 Feb 2021 18:20:54 +0000 (11:20 -0700)
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/pybind/mgr/cephadm/tests/test_spec.py
src/pybind/mgr/tox.ini

index 4fc21ebc63cc3fdab79d2beda238b91416d8cf1f..fe1d53366267a4339c47a9396f2164a388e19149 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',
@@ -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'')
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 79513623d1b194d97f7d7f0a812388bb351fdf0a..109bb26964c27c9a7d49a6d29bf56485837797e0 100644 (file)
@@ -12,7 +12,6 @@ requires = cython
 max-line-length = 100
 ignore =
     E501,
-    E712,
     E722,
     E731,
     E741,