Skip to content

Commit

Permalink
Updated BrokerMetadata#nodeId type from int to (int | str).
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgene committed Nov 3, 2024
1 parent 23efe72 commit e9697cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiokafka/structs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections.abc import Sequence
from dataclasses import dataclass
from typing import Generic, NamedTuple, Optional, TypeVar
from typing import Generic, List, NamedTuple, Optional, Sequence, Tuple, TypeVar, Union

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'List' is not used.
Import of 'Tuple' is not used.

from aiokafka.errors import KafkaError

Expand All @@ -27,7 +27,7 @@ class TopicPartition(NamedTuple):
class BrokerMetadata(NamedTuple):
"""A Kafka broker metadata used by admin tools"""

nodeId: int
nodeId: Union[int, str]
"The Kafka broker id"

host: str
Expand Down

0 comments on commit e9697cc

Please sign in to comment.