]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: improve the formatting of docstring
authorKefu Chai <tchaikov@gmail.com>
Sun, 6 Mar 2022 07:20:14 +0000 (15:20 +0800)
committerLaura Flores <lflores@redhat.com>
Thu, 24 Mar 2022 17:25:22 +0000 (12:25 -0500)
add an empty line before a doctest block would help
sphinx to tell where the session starts.

see also https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#doctest-blocks

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 8685fffdf20eeb4e2068c421e351aa02c48ff860)

src/python-common/ceph/deployment/service_spec.py

index 5bf47d39c79fa29881a2677a9fc5dae5a7ead365..be3f9deebeeee8332fa013ce5af5b4c598e69836 100644 (file)
@@ -314,28 +314,34 @@ class PlacementSpec(object):
         # type: (Optional[str]) -> PlacementSpec
         """
         A single integer is parsed as a count:
+
         >>> PlacementSpec.from_string('3')
         PlacementSpec(count=3)
 
         A list of names is parsed as host specifications:
+
         >>> PlacementSpec.from_string('host1 host2')
         PlacementSpec(hosts=[HostPlacementSpec(hostname='host1', network='', name=''), HostPlacemen\
 tSpec(hostname='host2', network='', name='')])
 
         You can also prefix the hosts with a count as follows:
+
         >>> PlacementSpec.from_string('2 host1 host2')
         PlacementSpec(count=2, hosts=[HostPlacementSpec(hostname='host1', network='', name=''), Hos\
 tPlacementSpec(hostname='host2', network='', name='')])
 
-        You can spefify labels using `label:<label>`
+        You can specify labels using `label:<label>`
+
         >>> PlacementSpec.from_string('label:mon')
         PlacementSpec(label='mon')
 
-        Labels als support a count:
+        Labels also support a count:
+
         >>> PlacementSpec.from_string('3 label:mon')
         PlacementSpec(count=3, label='mon')
 
         fnmatch is also supported:
+
         >>> PlacementSpec.from_string('data[1-3]')
         PlacementSpec(host_pattern='data[1-3]')