typeshed
typeshed copied to clipboard
Rewrote protobuf generation scripts in Python
Closes #12511
This is so much faster on Windows, takes a few seconds to run (including downloads and pre-commit). Compared to the over 1m it used to take me on WSL.
I have two design questions:
- Which usage do we prefer:
# A)
python scripts/sync_proto/tensorflow.py
# B)
python scripts/sync_proto.py tensorflow
# Which I could make work with the following for shell autocomplete
python scripts/sync_proto.py ./stubs/tensorflow
- Should I add a parametrized main function (something like
sync_stubs_with_proto) that takes all of a scripts' special needs as parameters (including a "post-run" Callable). Or keep the 3 scripts separate with shared helper functions.
I'm also open to name changes suggestions.