-
Notifications
You must be signed in to change notification settings - Fork 449
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
(Even) better merger errors #2226
Conversation
Thanks, good catches! |
I realize it's probably too late for a debate on principles, but is there a special reason why there's an enum and error classes instead of subclassing the base |
Maybe. I’ll take a look at doing it that way. |
Done, but now the code is sufficiently different, you're going to have to review it again. :-) |
Hm, this scuppers CFF merge errors, they follow their own logic. Maybe the merge errors with a cause should be subclasses of a UnsupportedFormat(self, subtable="pair positioning lookup")
# UnsupportedFormat(self, ({"subtable": "pair positioning lookup"},))
InconsistentGlyphOrder(self)
# InconsistentGlyphOrder(self, ({},)) |
@madig good catch about CFF-related VarLibMergeErrors (I'd expected the tests to fail?) also 👍 on using |
The tests don't fail, but the |
Yes, moving to kwargs was a good move; it allowed me to split up the reason from the traceback, which makes everything a lot tidier. |
Small nit: if your class has a docstring, you don't need a |
Fixes #2224 (as well as some other silent errors) and adds a test.