Skip to content

Commit 49a5573

Browse files
jackgeneods
andauthored
Updated BrokerMetadata#nodeId type from int to int | str. (#1051)
* Updated BrokerMetadata#nodeId type from int to (int | str). * FIXME. * Unused import. * Include issue link in FIXME. * Fix linter errors --------- Co-authored-by: Denis Otkidach <[email protected]>
1 parent 23efe72 commit 49a5573

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aiokafka/structs.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from collections.abc import Sequence
24
from dataclasses import dataclass
35
from typing import Generic, NamedTuple, Optional, TypeVar
@@ -27,7 +29,8 @@ class TopicPartition(NamedTuple):
2729
class BrokerMetadata(NamedTuple):
2830
"""A Kafka broker metadata used by admin tools"""
2931

30-
nodeId: int
32+
# FIXME: consider updating implementation (https://github.com/aio-libs/aiokafka/issues/1050)
33+
nodeId: int | str
3134
"The Kafka broker id"
3235

3336
host: str

0 commit comments

Comments
 (0)