Skip to content

Commit

Permalink
Updated BrokerMetadata#nodeId type from int to int | str. (#1051)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
jackgene and ods authored Nov 16, 2024
1 parent 23efe72 commit 49a5573
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aiokafka/structs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from collections.abc import Sequence
from dataclasses import dataclass
from typing import Generic, NamedTuple, Optional, TypeVar
Expand Down Expand Up @@ -27,7 +29,8 @@ class TopicPartition(NamedTuple):
class BrokerMetadata(NamedTuple):
"""A Kafka broker metadata used by admin tools"""

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

host: str
Expand Down

0 comments on commit 49a5573

Please sign in to comment.