Skip to content

Commit

Permalink
Merge pull request #840 from Aiven-Open/aiven-anton/refine-confluent-…
Browse files Browse the repository at this point in the history
…kafka-typing

chore: Refine confluent kafka typing
  • Loading branch information
jjaakola-aiven authored Mar 15, 2024
2 parents 143fa73 + f5d2b71 commit 26e8354
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions stubs/confluent_kafka/cimpl.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from confluent_kafka.admin._metadata import ClusterMetadata
from typing import Any, Callable, Final
from typing import Any, Callable, Final, overload

OFFSET_BEGINNING: Final = ...
OFFSET_END: Final = ...
Expand Down Expand Up @@ -87,9 +87,12 @@ class Consumer:
def consume(self, num_messages: int = 1, timeout: float = -1) -> list[Message]: ...
def poll(self, timeout: float = -1) -> Message | None: ...
def assign(self, partitions: list[TopicPartition]) -> None: ...
def commit(
self, message: Message | None = None, offsets: list[TopicPartition] | None = None, asynchronous: bool = True
) -> list[TopicPartition] | None: ...
@overload
def commit(self, asynchronous: bool = ...) -> list[TopicPartition] | None: ...
@overload
def commit(self, message: Message, asynchronous: bool = ...) -> list[TopicPartition] | None: ...
@overload
def commit(self, offsets: list[TopicPartition], asynchronous: bool = ...) -> list[TopicPartition] | None: ...
def committed(self, partitions: list[TopicPartition], timeout: float = -1) -> list[TopicPartition]: ...
def unsubscribe(self) -> None: ...
def assignment(self) -> list[TopicPartition]: ...
Expand Down

0 comments on commit 26e8354

Please sign in to comment.