Skip to content

Commit

Permalink
pythongh-104050: Argument clinic: Annotate str_converter_key() (pyt…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored and jtcave committed Jul 27, 2023
1 parent 78db31b commit 97da968
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *'
Expand Down

0 comments on commit 97da968

Please sign in to comment.