Skip to content

Commit 3c1fc00

Browse files
authored
lint: fix confluent subscriber decorator annotation (#2604)
1 parent 29a3f89 commit 3c1fc00

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

faststream/confluent/broker/registrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def subscriber(
114114
*topics: str,
115115
partitions: Sequence["TopicPartition"] = (),
116116
polling_interval: float = 0.1,
117-
group_id: None = None,
117+
group_id: str | None = None,
118118
group_instance_id: None = None,
119119
fetch_max_wait_ms: int = 500,
120120
fetch_max_bytes: int = 50 * 1024 * 1024,

tests/mypy/confluent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,8 @@ def check_subscriber_instance_type(
120120
KafkaRouter(routers=[KafkaRouter()])
121121
KafkaRouter().include_router(KafkaRouter())
122122
KafkaRouter().include_routers(KafkaRouter())
123+
124+
125+
@KafkaBroker().subscriber("mykey", group_id="my_group", batch=True)
126+
async def process_msgs() -> None:
127+
pass

0 commit comments

Comments
 (0)