KEMBAR78
stubtest: handle overloads with mixed pos-only params by tungol · Pull Request #18287 · python/mypy · GitHub
Skip to content

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.

@JelleZijlstra JelleZijlstra self-requested a review August 22, 2025 23:52
@JelleZijlstra JelleZijlstra merged commit f51b699 into python:master Aug 23, 2025
13 checks passed
@tungol tungol deleted the stubtest-pos-only branch August 23, 2025 04:52
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

2 participants