Add UnfilledModalError, records.verify_modal(), and .get_*() methods.
The .get_*() methods are used to verify that we aren't reading from a pattern with un-filled modals. The GeometryMixin class was also added here and provides some additional convenience methods: get_xy() to get an (x,y) tuple and get_layer_tuple() to get a (layer, datatype) tuple.
This commit is contained in:
parent
e4a62a0f32
commit
705926d443
3 changed files with 131 additions and 12 deletions
|
|
@ -59,6 +59,12 @@ class InvalidRecordError(FatamorganaError):
|
|||
"""
|
||||
pass
|
||||
|
||||
class UnfilledModalError(FatamorganaError):
|
||||
"""
|
||||
Attempted to call .get_var(), but var() was None!
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class PathExtensionScheme(Enum):
|
||||
"""
|
||||
|
|
@ -2228,4 +2234,3 @@ def read_magic_bytes(stream: io.BufferedIOBase):
|
|||
if magic != MAGIC_BYTES:
|
||||
raise InvalidDataError('Could not read magic bytes, '
|
||||
'found {!r} : {}'.format(magic, magic.decode()))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue