Skip to content

[Tooling] Initial implementation of stub checker#884

Draft
elpekenin wants to merge 2 commits intoadafruit:mainfrom
elpekenin:stubtest
Draft

[Tooling] Initial implementation of stub checker#884
elpekenin wants to merge 2 commits intoadafruit:mainfrom
elpekenin:stubtest

Conversation

@elpekenin
Copy link
Copy Markdown

@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
Copy Markdown
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