No stubs for brython for PyCharm - crucial to make it popular (coding efficiency - heart of Python).
See original GitHub issueI need autocomplete during coding in PyCharm. Python heart is fast coding so it is crucial.
I can not import really module from browser import document
since no such file - PyCharm will allow autocompletion.
I think you can generate *.pyi stubs to allow completion. It can be generated in console. I do not know how to do it but you can.
Without autocompletion coding is very hard for beginners and slow for experts. That is true obstacle to make it popular.
For example I can use brython (it is not productive) but my younger programmers will have very big problems.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:25 (7 by maintainers)
Top Results From Across the Web
django-stubs breaks code completion : PY-37744 - YouTrack
I tried several times to make QuerySet generic annotations compatible with both mypy and pycharm, but there's a bunch of errors / broken...
Read more >beartype - Python Package Health Analysis | Snyk
Beartype is an open-source PEP-compliant constant-time pure-Python runtime type checker emphasizing efficiency, usability, and thrilling puns.
Read more >Brython – A Python 3 implementation for client-side web ...
I have no numbers, but I suspect that once the initial download is done and cached, Python code should be smaller than JS...
Read more >Two Key Points of Containerisation You Need to Know by Heart
This article presents the two key points about containerisation you need to know by heart: ... Collection of Library Stubs for Python with...
Read more >Simple Index - Alibaba Cloud
4logik-python-rest-client ... a-pandas-ex-drop-duplicates-without-pain · a-pandas-ex-dumpsys-to-df ... adafruit-circuitpython-ble-heart-rate
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve created this module https://github.com/Real-Gecko/brython-stubs as a proof of concept.
https://user-images.githubusercontent.com/2231969/167427814-a6bd7517-4352-48dd-9adc-bba081987d92.mp4
Issues I see with this approach:
pyi
files are not generated frombrython
but are created manually.browser
tolib
which actually contains only stubs but no code, so possible name conflict with another modules. Using namebrowser-stubs
did not work with VSCode imports. Putting stubs tobrython
folder did not work, import needed to bebrython.browser.
Ok, I redid the PR and now we have
brython-stubs
submodule that can be put on PyPi I guess. It installsbrowser
folder which contains.pyi
files for Brython browser at least. However they’re incomplete as no JS modules are parsed. Preposition for Typescript remains 😄