-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Python 3.10 support #9
Comments
joelspadin
added a commit
to joelspadin/zmk-cli
that referenced
this issue
Oct 6, 2024
typing.Self requires Python 3.11. Replaced it with the class name for types that aren't subclassed or a TypeVar for types that are. The type annotation on Hardware.from_dict() must be given as a string, or pyupgrade will convert it to type[_Self], which breaks because Hardware has a member named "type" (which cannot be renamed since it must match the name of the YAML files the class represents). Fixes zmkfirmware#9
Merged
joelspadin
added a commit
that referenced
this issue
Oct 6, 2024
typing.Self requires Python 3.11. Replaced it with the class name for types that aren't subclassed or a TypeVar for types that are. The type annotation on Hardware.from_dict() must be given as a string, or pyupgrade will convert it to type[_Self], which breaks because Hardware has a member named "type" (which cannot be renamed since it must match the name of the YAML files the class represents). Fixes #9
Thanks for the report. Can you check if version 0.1.3 fixes the issue? |
All works, thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After adding Self to hardware.py and build.py, support for version 3.10 broke.
The text was updated successfully, but these errors were encountered: