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

[Project Suggestion] Add type hinting to firmware code #61

Closed
awonak opened this issue Jan 29, 2022 · 4 comments
Closed

[Project Suggestion] Add type hinting to firmware code #61

awonak opened this issue Jan 29, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation firmware Software related issue suggestion New feature or request

Comments

@awonak
Copy link
Collaborator

awonak commented Jan 29, 2022

Project Suggestion

MicroPython supports static type checking (at least up to Python version 3.6). The EuroPi firmware code should add type hinting to help improve static analysis and documentation for IDEs that support it.

Describe your suggestion or idea

By adding type hinting, this will make writing scripts easier by providing the expected type of parameters of the API.

There are no negative side effects for IDEs like Thonny that don't use it.

@awonak awonak added firmware Software related issue documentation Improvements or additions to documentation suggestion New feature or request labels Jan 29, 2022
@mjaskula
Copy link
Collaborator

Type hinting in micropython seems to be the wild west right now:

micropython/micropython-lib#190

It looks like we would need to include a stubs library like https://pypi.org/project/micropython-typing/ if we wanted to support this. So I think that means we'l need to have a better handle on our packaging before we tackle this.

So I think this issue depends on #71

@mjaskula mjaskula removed their assignment Feb 10, 2022
@pcurry
Copy link
Contributor

pcurry commented Oct 13, 2022

Has type hinting improved since Feb. ? Function hinting at least seems to be supported.

@mjaskula
Copy link
Collaborator

I haven’t looked into it since the 18 release.

@awonak
Copy link
Collaborator Author

awonak commented Apr 8, 2023

I think this has been open and unaddressed long enough that we can close it. If there is a renewed desire to take this on, we can reopen this issue.

@awonak awonak closed this as completed Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation firmware Software related issue suggestion New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants