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

[Tooling] Initial implementation of stub checker #884

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

elpekenin
Copy link

@elpekenin elpekenin commented Aug 13, 2024

As per title, just wrote a minimal (and very subject to improvements) script that will compare the actual implementation (.py) against the circuitpython-generated stubs (.pyi)

Note:

  • So far, only runs against the BLINKA_OS_AGNOSTIC target
    • I havent tested other targets because i expect them to fail due to lack of some connected hardware, or my computer not being what blinka is being told using the BLINKA_FORCECHIP environment variable
  • I dont know whether circuitpython's stubs (which im guessing are generated from the doc-comments on source code) are tested/validated in any way against the actual code that ends up exposed to Python's VM
  • Should the requirements license point to me? Im not a lawyer (:

The motivation for this is to find inconsistencies and fix them, such that code is actually portable between devices and not
almost portable because a function signature differs or whatever

@elpekenin
Copy link
Author

Some more info in #881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant