Combine class's docstings with __init__

This commit is contained in:
Honza Kral
2013-05-12 21:12:44 +02:00
parent 60a6cf9389
commit 43bac35d57
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ import sys, os
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
autoclass_content = "init"
autoclass_content = "both"
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
+4 -3
View File
@@ -46,11 +46,12 @@ def query_params(*es_query_params):
class Elasticsearch(object):
"""
Elasticsearch low-level client. Provides a straightforward mapping from
Python to ES REST endpoints.
"""
def __init__(self, hosts=None, **kwargs):
"""
Elasticsearch low-level client. Provides a straightforward mapping from
Python to ES REST endpoints.
:arg hosts: list of nodes we should connect to. Node should be a
dictionary ({"host": "localhost", "port": 9200}), the entire dictionary
will be passed to the :class:`~elasticsearch.Connection` class as