You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create_baseline_stubs.py script does not add default values #10126
As title says. Now that typeshed prefers having default values, it would make sense if the create_baseline_stubs.py script added them.
Maybe that would be stubgen's job?
For now I'm running https://github.com/JelleZijlstra/stubdefaulter manually as I am moving stubs out of https://github.com/microsoft/python-type-stubs, but I don't think that's even documented/mentioned in the contributing guidelines.
Given that stubdefaulter is only avaiable from github, it won't be cached by pip. Meaning if I add it to requirements-tests.txt, it'll cause extra unnecessary downloads for the CI.
Do you think it's a better idea to catch it as part of the create stub script? If not installed, stop the script and tell the user to install stubdefaulter? (python -m pip install git+https://github.com/JelleZijlstra/stubdefaulter.git#egg=stubdefaulter). It would be added to the initial pip install doc too.
Or ask @JelleZijlstra to publish the tool on PyPI. But if usage in create_baseline_stubs.py is meant to be "temporary" (you know how these things go sometimes :P ) until added to stubgen idk if worth it.
Activity
AlexWaygood commentedon May 1, 2023
Yeah, really this should be added to stubgen, but in the meantime, I wouldn't be opposed to adding a stubdefaulter step to
create_baseline_stubs.pyAvasam commentedon May 1, 2023
Given that stubdefaulter is only avaiable from github, it won't be cached by pip. Meaning if I add it to
requirements-tests.txt, it'll cause extra unnecessary downloads for the CI.Do you think it's a better idea to catch it as part of the create stub script? If not installed, stop the script and tell the user to install stubdefaulter? (
python -m pip install git+https://github.com/JelleZijlstra/stubdefaulter.git#egg=stubdefaulter). It would be added to the initialpip installdoc too.Or ask @JelleZijlstra to publish the tool on PyPI. But if usage in
create_baseline_stubs.pyis meant to be "temporary" (you know how these things go sometimes :P ) until added to stubgen idk if worth it.Thoughts?
JelleZijlstra commentedon May 1, 2023
https://pypi.org/project/stubdefaulter/0.1.0/
Oops, I missed the description. I guess that's for 0.2.0 :)
Avasam commentedon May 1, 2023
Awesome.
On it!