Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5aa6964

Browse filesBrowse files
authored
gh-104050: Argument clinic: Annotate str_converter_key() (#107294)
1 parent f9bcdf2 commit 5aa6964
Copy full SHA for 5aa6964

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎Tools/clinic/clinic.py

Copy file name to clipboardExpand all lines: Tools/clinic/clinic.py
+6-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.