| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| # Fill in the various *Name properties | ||
| if 'FontName' not in prop: | ||
| if not prop['FontName']: |
There was a problem hiding this comment.
Can we be certain that an empty string is not allowed here (and below)?
Sorry, something went wrong.
| index_token = next(tokens) | ||
| if not index_token.is_number(): | ||
| _log.warning( | ||
| f"Parsing encoding: expected number, got {index_token}" | ||
| ) | ||
| continue |
There was a problem hiding this comment.
This previously ignored parsing failures; did you intend to raise here?
Sorry, something went wrong.
This file now passes `mypy --strict` (but its imports don't). Improve error handling: a new class _ParseError instead of ValueError or RuntimeError. Raise most of the errors from utility functions to simplify the parsing logic. Move FontBBox parsing into a new utility function.
|
I rebased this and fixed the "easy" comments I made, i.e., the unused bits and the deprecated names. I also updated to the new type syntax. But there are still a couple unanswered questions above. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This file now passes mypy --strict (but its imports don't).
Improve error handling: a new class _ParseError instead of ValueError
or RuntimeError. Raise most of the errors from utility functions to
simplify the parsing logic. Move FontBBox parsing into a new utility
function.