-
Notifications
You must be signed in to change notification settings - Fork 14
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
Determine usefulness of attr validators as validation is done by fontTools.ufoLib already #27
Comments
Yeah, attrs validators only work in the constructor |
Hm... ufoLib will prevent me from saving the invalid data to disk. It will probably also prevent loading of such data. So.. maybe having validators that only fire on instantiation aren't that useful in ufoLib2? |
There is |
Which runs all validators, not desirable if you just set one property, no? |
You want to run that just before serialisation. Maybe Font.save method should call that automatically. |
I don’t want to wrap every attribute in a |
Well, ufoLib already validates on (de)serialization, so maybe we can do away with validators entirely? Setters would not be affected. Dunno, just a thought. Although there would be no checks for when you do everything in memory, but I suppose that isn't covered currently anyway. |
To do:
|
i'd say, drop all unnecessary validators that checks data integrity, which are already done in ufoLib. |
running attrs.validate() on attrs objects before serialization is still a good idea, it may catch things before it's too late. |
The text was updated successfully, but these errors were encountered: