gh-104050: Argument clinic: Annotate str_converter_key() (#107294)

This commit is contained in:
Alex Waygood 2023-07-26 21:12:18 +01:00 • committed by GitHub
parent f9bcdf2368
commit 5aa6964a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3624,10 +3624,14 @@ class buffer: pass
class rwbuffer: pass
class robuffer: pass
def str_converter_key(types, encoding, zeroes):
StrConverterKeyType = tuple[frozenset[type], bool, bool]
def str_converter_key(
types: TypeSet, encoding: bool | str | None, zeroes: bool
) -> StrConverterKeyType:
return (frozenset(types), bool(encoding), bool(zeroes))
str_converter_argument_map: dict[str, str] = {}
str_converter_argument_map: dict[StrConverterKeyType, str] = {}
class str_converter(CConverter):
type = 'const char *'