Skip to content

Fix Unions to Literals #77

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

Merged
merged 2 commits into from
Jun 7, 2023
Merged

Fix Unions to Literals #77

merged 2 commits into from
Jun 7, 2023

Conversation

tekktrik
Copy link
Member

@tekktrik tekktrik commented Jun 7, 2023

Fixes #76, which was using Union where Literal is needed in some places.

@tekktrik tekktrik requested a review from a team June 7, 2023 14:18
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Thank you @tekktrik!

I was unaware Literal was it's own thing and those values couldn't be used in other types of operators.

Do you think it would be possible or sensible to have one step in the actions that attempts to import the module within Linux / Blinka context to confirm that it is importable?

I did run this one on a microcontroller during testing, but that doesn't catch an issue like this since the types are ignored there. I hadn't thought to import it on a RasPi to verify, I can start attempting that though.

@FoamyGuy FoamyGuy merged commit 20f292d into adafruit:main Jun 7, 2023
@tekktrik
Copy link
Member Author

tekktrik commented Jun 7, 2023

It's one of the things I'd be interested in trying to do in parallel when I pick the rp2040js CI work I was doing again, to have Blinka import the library as you say. I do think we'll need to consider what how things are imported - for example a folder with an empty __init__.py file can be successfully import and make it look like the library overall is good, so we'll need to make sure we import multiple variations to fully check (e.g. import libname and import libname.sublibname).

I really like the idea and think it can be easily implemented in a way similar to: adafruit/actions-ci-circuitpython-libs#19 and it's planned implementation in the CI: adafruit/workflows-circuitpython-libs#23

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 8, 2023
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.

New TypeError introduced in v2.11.2
2 participants