Skip to content

Commit 5aa6964

Browse files
authored
pythongh-104050: Argument clinic: Annotate str_converter_key() (python#107294)
1 parent f9bcdf2 commit 5aa6964

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tools/clinic/clinic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,10 +3624,14 @@ class buffer: pass
36243624
class rwbuffer: pass
36253625
class robuffer: pass
36263626

3627-
def str_converter_key(types, encoding, zeroes):
3627+
StrConverterKeyType = tuple[frozenset[type], bool, bool]
3628+
3629+
def str_converter_key(
3630+
types: TypeSet, encoding: bool | str | None, zeroes: bool
3631+
) -> StrConverterKeyType:
36283632
return (frozenset(types), bool(encoding), bool(zeroes))
36293633

3630-
str_converter_argument_map: dict[str, str] = {}
3634+
str_converter_argument_map: dict[StrConverterKeyType, str] = {}
36313635

36323636
class str_converter(CConverter):
36333637
type = 'const char *'

0 commit comments

Comments
 (0)