Skip to content

Commit b82461d

Browse files
Improve stub generator
1 parent d9f5d36 commit b82461d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/generate_pybind_stubs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ def eq_sub_func(match: re.Match) -> str:
5858
else:
5959
return "\n".join(
6060
[
61-
f"{match.group('indent')}def __eq__(self, arg0: {match.group('other')}) -> {match.group('return')}:{match.group('ellipsis_docstring')}",
61+
f"{match.group('indent')}def __eq__(self, other: {match.group('other')}) -> {match.group('return')}:{match.group('ellipsis_docstring')}",
6262
f"{match.group('indent')}@typing.overload",
63-
f"{match.group('indent')}def __eq__(self, arg0: typing.Any) -> bool | types.NotImplementedType: ...",
63+
f"{match.group('indent')}def __eq__(self, other: typing.Any) -> bool | types.NotImplementedType: ...",
6464
]
6565
)
6666
else:
6767
return "\n".join(
6868
[
6969
f"{match.group('indent')}@typing.overload",
70-
f"{match.group('indent')}def __eq__(self, arg0: {match.group('other')}) -> {match.group('return')}:{match.group('ellipsis_docstring')}",
70+
f"{match.group('indent')}def __eq__(self, other: {match.group('other')}) -> {match.group('return')}:{match.group('ellipsis_docstring')}",
7171
f"{match.group('indent')}@typing.overload",
72-
f"{match.group('indent')}def __eq__(self, arg0: typing.Any) -> bool | types.NotImplementedType: ...",
72+
f"{match.group('indent')}def __eq__(self, other: typing.Any) -> bool | types.NotImplementedType: ...",
7373
]
7474
)
7575

0 commit comments

Comments
 (0)