Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add adafruit-circuitpython-typing to requirements-doc.txt #6092

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

Closed

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Feb 25, 2022

I thought the requirements changes in #6041 were sufficient to fix the doc build failures, but that was not the case: https://github.com/adafruit/circuitpython/actions/runs/1900267735 (merge build)

Adding adafruit-circuitpython-typing to requirements-doc.txt as well.

@dhalbert dhalbert requested review from tannewt and jepler February 25, 2022 21:07
@dhalbert
Copy link
Collaborator Author

Working on this in #6085, so making this draft for now.

@dhalbert dhalbert marked this pull request as draft February 27, 2022 05:30
@rimwolf-redux
Copy link

For #6085 at least, it looks like the circuitpython_typing package needs a py.typed file, and setup.py-stubs needs an item entry["circuitpython_typing"] = ["py.typed"] in the build_package_data function.

I've also noticed in tools/extract_pyi.py that there's a set CPY_TYPING with names that were in the old circuitpython_typing.cpi file, that seems to be used to compose an import of (just) those names from circuitpython_typing, around line 246. (And ByteStream isn't in that set.)

(I hope this is useful -- I'm using this issue to get familiar with the code base and build stuff.)

@dhalbert
Copy link
Collaborator Author

For #6085 at least, it looks like the circuitpython_typing package needs a py.typed file, and setup.py-stubs needs an item entry["circuitpython_typing"] = ["py.typed"] in the build_package_data function.

Thanks, yes, I did some research on this earlier this morning, came to the same conclusion as you, and am testing exactly this locally. I also am conditionally adding some definitions that were in shared-bindings/circuitpython_typing to the library.

Whether circuitpython_typing should be .pyi or .py files is also a bit confusing. In Python 3.10, evaluation of annotations is deferred, which would help. This feature is not in MicroPython yet.

This is the kind of thing we might discuss in "In the Weeds" in a Monday meeting, or at least in discord chat at some point.

@dhalbert
Copy link
Collaborator Author

dhalbert commented Mar 1, 2022

Superseded by additional changes to #6085.

@dhalbert dhalbert closed this Mar 1, 2022
@dhalbert dhalbert deleted the circuitpython-typing-requirements-doc branch March 1, 2022 15:18
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.

2 participants