Skip to content

Commit

Permalink
Improve incomplete type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Jul 24, 2024
1 parent abea358 commit 5d272d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kpops/component_handlers/topic/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def __execute_topic_creation(
)

if differences:
json_body = []
json_body: list[dict[str, str]] = []
for difference in differences:
if difference.diff_type is DiffType.REMOVE:
json_body.append(
Expand Down
4 changes: 2 additions & 2 deletions kpops/component_handlers/topic/proxy_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
from functools import cached_property
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any

import httpx

Expand Down Expand Up @@ -163,7 +163,7 @@ async def get_topic_config(self, topic_name: str) -> TopicConfigResponse:
raise KafkaRestProxyError(response)

async def batch_alter_topic_config(
self, topic_name: str, json_body: list[dict]
self, topic_name: str, json_body: list[dict[str, Any]]
) -> None:
"""Reset config of given config_name param to the default value on the Kafka server.
Expand Down
6 changes: 4 additions & 2 deletions kpops/component_handlers/topic/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

from kpops.component_handlers.topic.model import (
BrokerConfigResponse,
KafkaTopicConfigSource,
Expand All @@ -6,8 +8,8 @@


def parse_and_compare_topic_configs(
topic_config_in_cluster: TopicConfigResponse, topic_config: dict[str, str]
) -> tuple[dict[str, str], dict[str, str]]:
topic_config_in_cluster: TopicConfigResponse, topic_config: dict[str, Any]
) -> tuple[dict[str, str], dict[str, Any]]:
comparable_in_cluster_config_dict, default_configs = parse_rest_proxy_topic_config(
topic_config_in_cluster
)
Expand Down

0 comments on commit 5d272d2

Please sign in to comment.