Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added default version number to SymbolLib #55

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

zardini123
Copy link
Contributor

kiutils.symbol.SymbolLib does not have a default version number in KiUtils. A SymbolLib created in KiUtils that is then imported into KiCad fails to load due to the version number being "None", but KiCad 6.0 expects a version number.

This change uses the version number obtained from files migrated from .lib to .kicad_sym by KiCad's manager UI.

@@ -426,7 +426,7 @@ class SymbolLib():
Documentation:
https://dev-docs.kicad.org/en/file-formats/sexpr-symbol-lib/
"""
version: Optional[str] = None
version: str = "20211014"
Copy link
Owner

Choose a reason for hiding this comment

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

Please change to

version: str = KIUTILS_CREATE_NEW_VERSION_STR;

and add on top of the file:

from kiutils.misc.config import KIUTILS_CREATE_NEW_VERSION_STR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, brilliant. Thank you for the note.

@mvnmgrx
Copy link
Owner

mvnmgrx commented Feb 20, 2023

Indeed, the version number being optional is an oversight. I've added a minor comment to your changes, because we have a config file for that. I'm happy to merge your PR after that.

@mvnmgrx mvnmgrx added this to the v1.3.0 milestone Feb 20, 2023
@zardini123
Copy link
Contributor Author

Thank you for the suggestions. They are now implemented.

@mvnmgrx mvnmgrx merged commit c97aa9f into mvnmgrx:master Feb 20, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants