Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/confluent_kafka/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import concurrent.futures
import warnings
from collections.abc import Mapping
from typing import Any, Dict, List, Optional, Set, Tuple, Union

from confluent_kafka import ConsumerGroupState as _ConsumerGroupState
Expand Down Expand Up @@ -115,7 +116,7 @@ class AdminClient(_AdminClientImpl):
Requires broker version v0.11.0.0 or later.
"""

def __init__(self, conf: Dict[str, Union[str, int, float, bool]], **kwargs: Any) -> None:
def __init__(self, conf: Mapping[str, Union[str, int, float, bool]], **kwargs: Any) -> None:
"""
Create a new AdminClient using the provided configuration dictionary.

Expand Down
3 changes: 2 additions & 1 deletion src/confluent_kafka/cimpl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ maintenance burden and get type hints directly from the implementation.
"""

import builtins
from collections.abc import Mapping
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple, Union, overload

try:
Expand Down Expand Up @@ -540,7 +541,7 @@ class Consumer:
def set_sasl_credentials(self, username: str, password: str) -> None: ...

class _AdminClientImpl:
def __init__(self, config: Dict[str, Union[str, int, float, bool]]) -> None: ...
def __init__(self, config: Mapping[str, Union[str, int, float, bool]]) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(self, exc_type: Any, exc_value: Any, exc_traceback: Any) -> Optional[bool]: ...
def create_topics(
Expand Down