Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stubtest: handle overloads with mixed pos-only params #18287

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Dec 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stubtest mishandles overloads where param is pos-only in one overload
1 participant