Skip to content

Commit

Permalink
ruff fml.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgene committed Nov 16, 2024
1 parent 7662b0e commit d7b5abf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
16 changes: 9 additions & 7 deletions aiokafka/cluster.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ from aiokafka.protocol.metadata import (
from aiokafka.structs import BrokerMetadata, PartitionMetadata, TopicPartition

log = ...
MetadataResponse = MetadataResponse_v0 |\
MetadataResponse_v1 |\
MetadataResponse_v2 |\
MetadataResponse_v3 |\
MetadataResponse_v4 |\
MetadataResponse_v5
GroupCoordinatorResponse = GroupCoordinatorResponse_v0 | GroupCoordinatorResponse_v1
MetadataResponse = (
MetadataResponse_v0
| MetadataResponse_v1
| MetadataResponse_v2
| MetadataResponse_v3
| MetadataResponse_v4
| MetadataResponse_v5
)
GroupCoordinatorResponse = GroupCoordinatorResponse_v0 | GroupCoordinatorResponse_v1

class ClusterConfig(TypedDict):
retry_backoff_ms: int
Expand Down
2 changes: 0 additions & 2 deletions aiokafka/errors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,12 @@ class ConsumerStoppedError(Exception):
ones.
"""


class IllegalOperation(Exception):
"""Raised if you try to execute an operation, that is not available with
current configuration. For example trying to commit if no group_id was
given.
"""


class NoOffsetForPartitionError(KafkaError): ...
class RecordTooLargeError(KafkaError): ...
class ProducerClosed(KafkaError): ...
Expand Down
1 change: 0 additions & 1 deletion aiokafka/protocol/metadata.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ class MetadataRequest_v5(Request):
An additional field for offline_replicas has been added to the v5 metadata response
"""


MetadataRequest = ...
MetadataResponse = ...
2 changes: 1 addition & 1 deletion aiokafka/protocol/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Float64(AbstractType[float]):
class String:
def __init__(self, encoding: str = ...) -> None: ...
def encode(self, value: str | None) -> bytes: ...
def decode(self, data: BytesIO) -> str| None: ...
def decode(self, data: BytesIO) -> str | None: ...
@classmethod
def repr(cls, value: str) -> str: ...

Expand Down

0 comments on commit d7b5abf

Please sign in to comment.