Add a contrib module to generate type hints for capnp schemas#260
Add a contrib module to generate type hints for capnp schemas#260gjcarneiro wants to merge 5 commits intocapnproto:masterfrom
Conversation
|
This pull request introduces 5 alerts when merging 6cb558c into 581332f - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging 9166a49 into 581332f - view on LGTM.com new alerts:
|
|
|
I'm definitely interested in including this, but please fix the warnings and errors first. |
|
This pull request introduces 1 alert when merging 574eb05 into 5dade41 - view on LGTM.com new alerts:
|
|
Closer, but still seeing some linting errors |
|
Hm, can you tell me the command to check those? To be honest, I just format with black. How quaint that this project wants a formatting style not compatible with black.. |
|
I've started using black for some other projects (I quite like it actually). I'll do some experimentation to see how much it changes pycapnp (losing git blame history is a bit of a pain). flake8 . --filename '*.py,*.pyx,*.pxd' --count --max-complexity=10 --max-line-length=120 --ignore=E211,E225,E226,E227,E231,E251,E261,E262,E265,E402,E999 --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx
flake8 . --count --max-complexity=10 --max-line-length=120 --show-source --statistics --exclude benchmark,build |
|
I think I've found the issue, I'll be updating the flake8 configuration shortly. |
|
@gjcarneiro can you rebase your commit to master? It should hopefully pass now. |
|
This pull request introduces 1 alert when merging b310447 into 6e7fffd - view on LGTM.com new alerts:
|
Hello. I wrote a python module to generate python type hints for capnp schema modules.
I have done some testing on it, with a private code base. It probably isn't complete. Most notably, I haven't written support for interfaces (have not needed them yet).
I thought you could include it as a contrib module, to be invoked thus:
python -m capnp.contrib.genpyi ....Even if not complete, I think it can be useful already. At least I am finding it useful on my code bases...