Skip to content

Commit e392e0c

Browse files
Vetoshkin Nikitamumrah
authored andcommitted
style: use triple quotes for docstrings
1 parent e87cdde commit e392e0c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

kafka/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def __init__(self, host, port, bufsize=4096, client_id=CLIENT_ID):
3737
##################
3838

3939
def _get_conn_for_broker(self, broker):
40-
"Get or create a connection to a broker"
40+
"""
41+
Get or create a connection to a broker
42+
"""
4143
if (broker.host, broker.port) not in self.conns:
4244
self.conns[(broker.host, broker.port)] = \
4345
KafkaConnection(broker.host, broker.port, self.bufsize)
@@ -97,7 +99,9 @@ def _load_metadata_for_topics(self, *topics):
9799
self.topic_partitions[topic].append(partition)
98100

99101
def _next_id(self):
100-
"Generate a new correlation id"
102+
"""
103+
Generate a new correlation id
104+
"""
101105
return KafkaClient.ID_GEN.next()
102106

103107
def _send_broker_unaware_request(self, requestId, request):

kafka/conn.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,17 @@ def send(self, requestId, payload):
8080
raise RuntimeError("Kafka went away")
8181

8282
def recv(self, requestId):
83-
"Get a response from Kafka"
83+
"""
84+
Get a response from Kafka
85+
"""
8486
log.debug("Reading response %d from Kafka" % requestId)
8587
self.data = self._consume_response()
8688
return self.data
8789

8890
def close(self):
89-
"Close this connection"
91+
"""
92+
Close this connection
93+
"""
9094
self._sock.close()
9195

9296
def reinit(self):

0 commit comments

Comments
 (0)