Skip to content

Commit f990322

Browse files
committed
Add import line to make example easier to run
1 parent c67a86f commit f990322

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/sphinx/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def add_client_usage_example(app, what, name, obj, options, lines):
4444
" :class:`~elasticsearch.Elasticsearch` client. For example::"
4545
)
4646
lines.append("")
47+
lines.append(" from elasticsearch import Elasticsearch")
48+
lines.append("")
4749
lines.append(" # Create the client instance")
4850
lines.append(" client = Elasticsearch(...)")
4951
lines.append(f" # Use the {sub_client_name} client")

0 commit comments

Comments
 (0)