Skip to content

Commit

Permalink
chore: fix enums in stubs
Browse files Browse the repository at this point in the history
 to address recent mypy changes
  • Loading branch information
keejon committed Jan 22, 2025
1 parent b5542cc commit 569aa1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions stubs/confluent_kafka/admin/_config.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from ._resource import ResourceType
from enum import Enum
from typing import cast

class ConfigResource:
Type = ResourceType
Expand All @@ -12,7 +13,7 @@ class ConfigResource:
) -> None: ...

class ConfigSource(Enum):
UNKNOWN_CONFIG: int
DYNAMIC_TOPIC_CONFIG: int
UNKNOWN_CONFIG = cast(int, ...)
DYNAMIC_TOPIC_CONFIG = cast(int, ...)

class ConfigEntry: ...
3 changes: 2 additions & 1 deletion stubs/confluent_kafka/admin/_resource.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import Enum
from typing import cast

class ResourceType(Enum):
TOPIC: int
TOPIC = cast(int, ...)

0 comments on commit 569aa1f

Please sign in to comment.