Skip to content

Commit 1a3f1cc

Browse files
committed
Resolve lint
1 parent 3b26eb7 commit 1a3f1cc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/wyoming_openai/utilities.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
from collections.abc import Callable
33
from enum import Enum
44
from io import BytesIO
5-
from typing import TypeVar
65

7-
E = TypeVar('E', bound=Enum)
86

9-
10-
def create_enum_parser(enum_class: type[E], case_insensitive: bool = True) -> Callable[[str], E]:
7+
def create_enum_parser[E: Enum](enum_class: type[E], case_insensitive: bool = True) -> Callable[[str], E]:
118
"""
129
Create a type-safe parser function for argparse that converts strings to enum members.
1310

0 commit comments

Comments
 (0)