-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add a contrib module to generate type hints for capnp schemas #260
base: master
Are you sure you want to change the base?
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...