From 867069fd8c07515f7934aa0d73f8b204d0f88da8 Mon Sep 17 00:00:00 2001 From: Jack Leow Date: Sat, 2 Nov 2024 20:47:36 -0700 Subject: [PATCH] FIXME. --- aiokafka/structs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aiokafka/structs.py b/aiokafka/structs.py index 748243cc..f89f25a5 100644 --- a/aiokafka/structs.py +++ b/aiokafka/structs.py @@ -1,6 +1,7 @@ +from __future__ import annotations from collections.abc import Sequence from dataclasses import dataclass -from typing import Generic, List, NamedTuple, Optional, Sequence, Tuple, TypeVar, Union +from typing import Generic, NamedTuple, Optional, Sequence, TypeVar from aiokafka.errors import KafkaError @@ -27,7 +28,7 @@ class TopicPartition(NamedTuple): class BrokerMetadata(NamedTuple): """A Kafka broker metadata used by admin tools""" - nodeId: Union[int, str] + nodeId: int | str # FIXME consider updating implementation "The Kafka broker id" host: str