Skip to content
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

Type hints for pyb module specific to Pyboard #16

Open
vlasovskikh opened this issue Sep 9, 2017 · 10 comments

Comments

@vlasovskikh
Copy link
Owner

commented Sep 9, 2017

It would be great to have good code analysis for the pyb module specific to Pyboard. We need a Python stub file similar to those ones in the typehints/ directory.

@vlasovskikh

This comment has been minimized.

Copy link
Owner Author

commented Sep 9, 2017

@stefanhoelzl How do you feel about contributing the initial version of the type hints for the pyb module? It would enable good code completion / type checking / documentation for Pyboard in the MicroPython plugin.

@vlasovskikh vlasovskikh added the Pyboard label Jan 18, 2018
@domgiles

This comment has been minimized.

Copy link

commented Feb 4, 2018

It's not clear to me... Is anyone working on this?

@vlasovskikh

This comment has been minimized.

Copy link
Owner Author

commented Feb 7, 2018

@domgiles No, there isn't anyone who is working on it. A pull request with pyb stubs similar to what we have in the typehints/ directory is welcome.

@domgiles

This comment has been minimized.

Copy link

commented Feb 13, 2018

I'll see if I can find some time to take a look at it. No promises. I'm more comfortable in Java but I've a reasonable grasp of Python. It looks like more of a editing issue than anything really creative... right?

@vlasovskikh

This comment has been minimized.

Copy link
Owner Author

commented Feb 13, 2018

@domgiles Yes, it is more about converting the docs for pyb into the Python stubs format, copying docstring and specifying types.

@domgiles

This comment has been minimized.

Copy link

commented Feb 15, 2018

First let me start bu apologising for my lack of experience in working with plugins for the JetBrains Environment. I've pulled the code. Can you explain a couple of things. On running ./gradlew clean runIde it launches the intellij IDE (Which I already have the project in). I'm not sure but I was expecting to launch PyCharm with an updated build of the plugin installed. Did I miss something? i.e. Whats the workflow to enable me to make changes and then test them in PyCharm?

@vlasovskikh

This comment has been minimized.

Copy link
Owner Author

commented Feb 17, 2018

@domgiles Yes, ./gradlew clean runIde launches IntelliJ with the plugin by default, not PyCharm with the plugin. Please check the comments in gradle.properties. There you can uncomment the line with the path to PyCharm and specify the path to your PyCharm installation. It should be the path to the directory where bin/, lib/, plugins/, and other folders of PyCharm are located. In particular on macOS it's not /path/to/PyCharm.app, but /path/to/PyCharm.app/Contents/. PyCharm should be installed locally, gradlew won't download PyCharm for you.

If you're not familiar with IntelliJ, you can just edit files in your Git working directory and then launch PyCharm via ./gradlew runIde. Alternatively, you can open the intellij-micropython project in IntelliJ Community Edition and edit code there. Make sure you've imported the project from existing sources as a Gradle project. You can then use "View | Tool Windows | Gradle" to launch Gradle tasks. IntelliJ will provide you with code highlighting and smart code completion for Kotlin and Python (download the Python plugin for the latter).

@domgiles

This comment has been minimized.

Copy link

commented Mar 4, 2018

@przemekgalazka

This comment has been minimized.

Copy link

commented Apr 13, 2018

@domgiles any news on this port?

@domgiles

This comment has been minimized.

Copy link

commented Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.