]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Expected 2 blank lines, found 0 (E302)
authorMichael Fritch <mfritch@suse.com>
Thu, 28 Jan 2021 02:52:03 +0000 (19:52 -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 7e73af4b9880f971129b213a55d083bea2d9c342)

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

index 28b219ba9c5ccb31c88f90efab4a67d8b354b313..e07819c37e909357ad25a2312ded26f688caf45b 100644 (file)
@@ -182,6 +182,7 @@ test_explicit_scheduler_results = [
     (k("123 123 * *"), exactly('1', '2', '3')),
 ]
 
+
 @pytest.mark.parametrize("spec_section_key,spec_section",
     [   # noqa: E128
         ('h', 'hosts'),
@@ -325,6 +326,7 @@ class NodeAssignmentTest(NamedTuple):
     daemons: List[DaemonDescription]
     expected: List[str]
 
+
 @pytest.mark.parametrize("service_type,placement,hosts,daemons,expected",
     [   # noqa: E128
         # just hosts
@@ -448,6 +450,7 @@ class NodeAssignmentTest2(NamedTuple):
     expected_len: int
     in_set: List[str]
 
+
 @pytest.mark.parametrize("service_type,placement,hosts,daemons,expected_len,in_set",
     [   # noqa: E128
         # just count
@@ -519,6 +522,7 @@ def test_node_assignment2(service_type, placement, hosts,
     for h in [h.hostname for h in hosts]:
         assert h in in_set
 
+
 @pytest.mark.parametrize("service_type,placement,hosts,daemons,expected_len,must_have",
     [   # noqa: E128
         # hosts + (smaller) count, (more) existing
@@ -572,6 +576,8 @@ class NodeAssignmentTestBadSpec(NamedTuple):
     hosts: List[str]
     daemons: List[DaemonDescription]
     expected: str
+
+
 @pytest.mark.parametrize("service_type,placement,hosts,daemons,expected",
     [   # noqa: E128
         # unknown host
@@ -607,6 +613,7 @@ def test_bad_specs(service_type, placement, hosts, daemons, expected):
             get_daemons_func=lambda _: daemons).place()
     assert str(e.value) == expected
 
+
 class ActiveAssignmentTest(NamedTuple):
     service_type: str
     placement: PlacementSpec
@@ -756,6 +763,7 @@ def test_active_assignment(service_type, placement, hosts, daemons, expected):
         get_daemons_func=lambda _: daemons).place()
     assert sorted([h.hostname for h in hosts]) in expected
 
+
 class OddMonsTest(NamedTuple):
     service_type: str
     placement: PlacementSpec
index 2374d951e5e2104c9e8d121440e8fdc010da23c8..0537778994cfa1a561d4351d2ccdb24514a950b8 100644 (file)
@@ -661,6 +661,7 @@ def test_custom_container_spec_config_json():
     for key in ['entrypoint', 'uid', 'gid', 'bind_mounts', 'dirs']:
         assert key not in config_json
 
+
 def test_HA_RGW_spec():
     yaml_str = """service_type: ha-rgw
 service_id: haproxy_for_rgw
index 8795a2003fd0ed14ae2e6040ede6b4824afb0da9..41d14b54c73f0510f022352bc118d5040246fc6b 100644 (file)
@@ -11,7 +11,6 @@ requires = cython
 [flake8]
 max-line-length = 100
 ignore =
-    E302,
     E306,
     E501,
     E703,