Skip to content

Commit c4e7446

Browse files
authored
docs: fixup sphinx warnings (#3060)
1 parent a762d4c commit c4e7446

8 files changed

Lines changed: 26 additions & 24 deletions

File tree

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ Compatibility
13711371

13721372

13731373
1.4.4 (Nov 20, 2018)
1374-
##########
1374+
####################
13751375

13761376
Bugfixes
13771377
--------

docs/conf.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'sphinx.ext.intersphinx',
3434
'sphinx.ext.viewcode',
3535
'sphinx.ext.napoleon',
36+
'sphinx_rtd_theme',
3637
]
3738

3839
# Add any paths that contain templates here, relative to this directory.
@@ -133,7 +134,7 @@
133134
# Add any paths that contain custom static files (such as style sheets) here,
134135
# relative to this directory. They are copied after the builtin static files,
135136
# so a file named "default.css" will overwrite the builtin "default.css".
136-
html_static_path = ['_static']
137+
#html_static_path = ['_static']
137138

138139
# Add any extra paths that contain custom files (such as robots.txt or
139140
# .htaccess) here, relative to this directory. These files are copied
@@ -262,10 +263,3 @@
262263

263264
# If true, do not generate a @detailmenu in the "Top" node's menu.
264265
#texinfo_no_detailmenu = False
265-
266-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
267-
268-
if not on_rtd: # only import and set the theme if we're building docs locally
269-
import sphinx_rtd_theme
270-
html_theme = 'sphinx_rtd_theme'
271-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ support https://pypi.python.org/pypi/crc32c package if it's installed.
3737
3838
3939
Optional ZSTD install
40-
********************
40+
*********************
4141

4242
To enable ZSTD compression/decompression, install python-zstandard:
4343

docs/usage.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ KafkaProducer
219219
220220
221221
ClusterMetadata
222-
=============
222+
===============
223+
223224
.. code:: python
224225
225226
from kafka.cluster import ClusterMetadata
@@ -240,8 +241,10 @@ ClusterMetadata
240241
241242
242243
KafkaAdminClient
243-
=============
244+
================
245+
244246
.. code:: python
247+
245248
from kafka import KafkaAdminClient
246249
from kafka.admin import NewTopic
247250

kafka/admin/_topics.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ def create_topics(self, new_topics, timeout_ms=None, validate_only=False, raise_
9494
"""Create new topics in the cluster.
9595
9696
Arguments:
97-
new_topics: A list of topic names,
98-
or a dict of {topic_name: {num_partitions: int (default -1),
99-
replication_factor: int (default -1),
100-
assignments: {partition: [broker_ids]},
101-
configs: {key: value}}}
102-
All keys are optional.
97+
new_topics: A list of topic names, or a dict mapping each topic
98+
name to a dict of options (all keys optional)::
99+
100+
{topic_name: {num_partitions: int (default -1),
101+
replication_factor: int (default -1),
102+
assignments: {partition: [broker_ids]},
103+
configs: {key: value}}}
104+
103105
List of NewTopic objects is deprecated.
104106
Note: for brokers < 2.4, num_partitions and replication_factor
105107
are required and must be provided via dict or [NewTopic].

kafka/admin/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ class KafkaAdminClient(
134134
timeout (see bootstrap_timeout_ms below).
135135
Different versions enable different functionality.
136136
137-
Examples:
138-
(4, 2) most recent broker release, enable all supported features
137+
Examples::
138+
139+
(4, 3) most recent broker release, enable all supported features
139140
(0, 11) enables message format v2 (internal)
140141
(0, 10, 0) enables sasl authentication and message format v1
141142
(0, 9) enables full group coordination features with automatic

kafka/consumer/group.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,9 @@ class KafkaConsumer:
229229
timeout (see bootstrap_timeout_ms below).
230230
Different versions enable different functionality.
231231
232-
Examples:
233-
(4, 2) most recent broker release, enable all supported features
232+
Examples::
233+
234+
(4, 3) most recent broker release, enable all supported features
234235
(0, 11) enables message format v2 (internal)
235236
(0, 10, 0) enables sasl authentication and message format v1
236237
(0, 9) enables full group coordination features with automatic

kafka/producer/kafka.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,9 @@ class KafkaProducer:
346346
timeout (see bootstrap_timeout_ms below).
347347
Different versions enable different functionality.
348348
349-
Examples:
350-
(4, 2) most recent broker release, enable all supported features
349+
Examples::
350+
351+
(4, 3) most recent broker release, enable all supported features
351352
(0, 11) enables message format v2 (internal)
352353
(0, 10, 0) enables sasl authentication and message format v1
353354
(0, 9) enables full group coordination features with automatic

0 commit comments

Comments
 (0)