Skip to content
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

Additional Locations is required #35

Open
aaronbell opened this issue Jun 25, 2020 · 3 comments
Open

Additional Locations is required #35

aaronbell opened this issue Jun 25, 2020 · 3 comments

Comments

@aaronbell
Copy link

At current the code is set up to require additional locations to be defined when calling statmake.lib.apply_stylespace_to_variable_font, even if one does not have additional locations to define. Additionally, it looks like the _sanity_check code and _generate_builder_data also assume the presence of additional defined locations.

I went through and added if additional_locations is not None: to my copy of lib.py so now it works ok! Figure you might want to implement it a different way, so thought I'd just file a bug.

@madig
Copy link
Collaborator

madig commented Jun 27, 2020

I did that so I didn't need to deal with Nones, which I find annoying. Setting {} as the default argument does no good in Python. Just add an empty {} to the call: https://github.com/daltonmaag/statmake/blob/v0.3.0/src/statmake/cli.py#L57

@madig madig closed this as completed Jun 27, 2020
@aaronbell
Copy link
Author

Fair enough. I still think it would be better to have the additional_locations set as optional rather than required (and provide a default state of {} if not explicitly set). That way one doesn't even have to include empty braces if it is unnecessary (which I find a bit annoying 😆 )

@madig
Copy link
Collaborator

madig commented Jun 28, 2020

Mh.. well Ok, I guess it won't hurt to add a is None check in apply_stylespace_to_variable_font.

@madig madig reopened this Jun 28, 2020
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

No branches or pull requests

2 participants