Fix for specifying cpy-version when installing#264
Open
RoscoP wants to merge 1 commit into
Open
Conversation
dunkmann00
reviewed
Jan 25, 2026
| using_webworkflow = "host" in ctx.params.keys() and ctx.params["host"] is not None | ||
|
|
||
| version_override = None | ||
| if board_id or cpy_version: |
Contributor
There was a problem hiding this comment.
I think this should be an and if we go by the cli help description for these flags.
dunkmann00
reviewed
Jan 25, 2026
| click.secho("Could not find a connected CircuitPython device.", fg="red") | ||
| sys.exit(1) | ||
| else: | ||
| cpy_version, board_id = ( |
Contributor
There was a problem hiding this comment.
This becomes not necessary with the improvement you made. If you want you could make this just cpy_version, board_id = ctx.obj["backend"].get_circuitpython_version()
Contributor
|
Hey nice catch! I'm not a maintainer but have done some work with this repo lately and had a couple of suggestions that I thought I'd share. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Fixing an exception issue when using circup, and specifying --cpy-version. This makes changes to the main() and version_override values passed to the backends. Previously this value was set to a string, but usage of get_circuitpython_version() returned a tuple.
Behavior
Previously, calling
circup --path . --cpy-version '10.0.3' --board-id adafruit_qtpy_esp32s2 install adafruit-circuitpython-asynciocaused an exception:This was due to this line:
Requiring the return value to be a tuple, the first entry to be a semver. This fix resolves this.