Commit f51b699
authored
stubtest: handle overloads with mixed pos-only params (#18287)
Fixes #17023
Stubtest should only mangle positional-only parameter names if they're
positional-only in all branches of the overload. The signatures get
really ugly and wrong otherwise.
I'm not sure if I did the new `test_overload_signature` in the best way.
I couldn't figure out a way to get covert a string into a
`nodes.OverloadedFuncDef` object with any of the techniques in existing
tests in `teststubtest.py`. Maybe the new test case is sufficient, but I
wanted to test the signature generation directly.1 parent ac4cacb commit f51b699
2 files changed
+65
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
| 957 | + | |
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
| 962 | + | |
| 963 | + | |
967 | 964 | | |
968 | 965 | | |
969 | 966 | | |
970 | 967 | | |
971 | | - | |
972 | | - | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
973 | 987 | | |
974 | 988 | | |
975 | 989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
| |||
842 | 854 | | |
843 | 855 | | |
844 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
845 | 869 | | |
846 | 870 | | |
847 | 871 | | |
| |||
2790 | 2814 | | |
2791 | 2815 | | |
2792 | 2816 | | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2793 | 2836 | | |
2794 | 2837 | | |
2795 | 2838 | | |
| |||
0 commit comments