From 46473bacafd759bc6cd072876327c6a7a5415007 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sat, 5 Aug 2023 07:58:37 +1000 Subject: [PATCH] docs: Fix a few typos (#2319) * docs: Fix a few typos There are small typos in: - kafka/codec.py - kafka/coordinator/base.py - kafka/record/abc.py - kafka/record/legacy_records.py Fixes: - Should read `timestamp` rather than `typestamp`. - Should read `minimum` rather than `miniumum`. - Should read `encapsulated` rather than `incapsulates`. - Should read `callback` rather than `callbak`. * Update abc.py --- kafka/codec.py | 2 +- kafka/coordinator/base.py | 2 +- kafka/record/abc.py | 2 +- kafka/record/legacy_records.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kafka/codec.py b/kafka/codec.py index 917400e74..c740a181c 100644 --- a/kafka/codec.py +++ b/kafka/codec.py @@ -187,7 +187,7 @@ def _detect_xerial_stream(payload): The version is the version of this format as written by xerial, in the wild this is currently 1 as such we only support v1. - Compat is there to claim the miniumum supported version that + Compat is there to claim the minimum supported version that can read a xerial block stream, presently in the wild this is 1. """ diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py index 5e41309df..e71984108 100644 --- a/kafka/coordinator/base.py +++ b/kafka/coordinator/base.py @@ -952,7 +952,7 @@ def _run_once(self): # disable here to prevent propagating an exception to this # heartbeat thread # must get client._lock, or maybe deadlock at heartbeat - # failure callbak in consumer poll + # failure callback in consumer poll self.coordinator._client.poll(timeout_ms=0) with self.coordinator._lock: diff --git a/kafka/record/abc.py b/kafka/record/abc.py index d5c172aaa..8509e23e5 100644 --- a/kafka/record/abc.py +++ b/kafka/record/abc.py @@ -85,7 +85,7 @@ def build(self): class ABCRecordBatch(object): - """ For v2 incapsulates a RecordBatch, for v0/v1 a single (maybe + """ For v2 encapsulates a RecordBatch, for v0/v1 a single (maybe compressed) message. """ __metaclass__ = abc.ABCMeta diff --git a/kafka/record/legacy_records.py b/kafka/record/legacy_records.py index e2ee5490c..2f8523fcb 100644 --- a/kafka/record/legacy_records.py +++ b/kafka/record/legacy_records.py @@ -263,7 +263,7 @@ def __iter__(self): # When magic value is greater than 0, the timestamp # of a compressed message depends on the - # typestamp type of the wrapper message: + # timestamp type of the wrapper message: if timestamp_type == self.LOG_APPEND_TIME: timestamp = self._timestamp