Skip to content

Commit 55aa2dd

Browse files
committed
Fix inline examples
1 parent 96039f1 commit 55aa2dd

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

splunklib/binding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def _parse_cookies(cookie_str, dictionary):
8080
then updates the the dictionary with any key-value pairs found.
8181
8282
**Example**::
83+
8384
dictionary = {}
8485
_parse_cookies('my=value', dictionary)
8586
# Now the following is True

splunklib/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ def __getitem__(self, key):
12001200
:raises ValueError: Raised if no namespace is specified and *key*
12011201
does not refer to a unique name.
12021202
1203-
*Example*::
1203+
**Example**::
12041204
12051205
s = client.connect(...)
12061206
saved_searches = s.saved_searches
@@ -1636,9 +1636,9 @@ def get(self, name="", owner=None, app=None, sharing=None, **query):
16361636
:rtype: ``dict`` with keys ``body``, ``headers``, ``reason``,
16371637
and ``status``
16381638
1639-
Example:
1639+
**Example**::
16401640
1641-
import splunklib.client
1641+
import splunklib.client
16421642
s = client.service(...)
16431643
saved_searches = s.saved_searches
16441644
saved_searches.get("my/saved/search") == \\

splunklib/modularinput/validation_definition.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ValidationDefinition(object):
2828
2929
**Example**::
3030
31-
``v = ValidationDefinition()``
31+
v = ValidationDefinition()
3232
3333
"""
3434
def __init__(self):
@@ -46,20 +46,22 @@ def parse(stream):
4646
4747
The XML typically will look like this:
4848
49-
``<items>``
50-
`` <server_host>myHost</server_host>``
51-
`` <server_uri>https://127.0.0.1:8089</server_uri>``
52-
`` <session_key>123102983109283019283</session_key>``
53-
`` <checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>``
54-
`` <item name="myScheme">``
55-
`` <param name="param1">value1</param>``
56-
`` <param_list name="param2">``
57-
`` <value>value2</value>``
58-
`` <value>value3</value>``
59-
`` <value>value4</value>``
60-
`` </param_list>``
61-
`` </item>``
62-
``</items>``
49+
.. code-block:: xml
50+
51+
<items>
52+
<server_host>myHost</server_host>
53+
<server_uri>https://127.0.0.1:8089</server_uri>
54+
<session_key>123102983109283019283</session_key>
55+
<checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>
56+
<item name="myScheme">
57+
<param name="param1">value1</param>
58+
<param_list name="param2">
59+
<value>value2</value>
60+
<value>value3</value>
61+
<value>value4</value>
62+
</param_list>
63+
</item>
64+
</items>
6365
6466
:param stream: ``Stream`` containing XML to parse.
6567
:return definition: A ``ValidationDefinition`` object.

0 commit comments

Comments
 (0)