From 0c64bc727d69af956060ffddceec7a5dc2efefdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gabriel=20Gruber?= Date: Thu, 22 Sep 2022 13:02:11 -0300 Subject: [PATCH] Fixed type annotations to support Python 2.7 --- kafka/producer/kafka.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index ecaf4bc28..0c9a7e589 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -538,7 +538,8 @@ def _estimate_size_in_bytes(self, key, value, headers=[]): return LegacyRecordBatchBuilder.estimate_size_in_bytes( magic, self.config['compression_type'], key, value) - def send(self, topic, value=None, key=None, headers=None, partition=None, timestamp_ms=None) -> RecordMetadata: + def send(self, topic, value=None, key=None, headers=None, partition=None, timestamp_ms=None): + # type: (str, bytes, bytes, list, int, int) -> RecordMetadata """Publish a message to a topic. Arguments: