mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 08:50:54 +00:00
corrupt remarks now in unrecognized statements
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# pycmx
|
# pycmx
|
||||||
# (c) 2018-2025 Jamie Hardt
|
# (c) 2018-2025 Jamie Hardt
|
||||||
|
|
||||||
from pycmx.statements import (StmtTitle, StmtEvent, StmtUnrecognized,
|
from pycmx.statements import (StmtCorruptRemark, StmtTitle, StmtEvent, StmtUnrecognized,
|
||||||
StmtSourceUMID)
|
StmtSourceUMID)
|
||||||
from .event import Event
|
from .event import Event
|
||||||
from .channel_map import ChannelMap
|
from .channel_map import ChannelMap
|
||||||
|
|
||||||
from typing import Generator
|
from typing import Any, Generator
|
||||||
|
|
||||||
|
|
||||||
class EditList:
|
class EditList:
|
||||||
@@ -63,13 +63,15 @@ class EditList:
|
|||||||
return self.title_statement.title
|
return self.title_statement.title
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unrecognized_statements(self) -> Generator[StmtUnrecognized,
|
def unrecognized_statements(self) -> Generator[Any, None, None]:
|
||||||
None, None]:
|
|
||||||
"""
|
"""
|
||||||
A generator for all the unrecognized statements in the list.
|
A generator for all the unrecognized statements and
|
||||||
|
corrupt remarks in the list.
|
||||||
|
:yields: either a :class:`StmtUnrecognized` or
|
||||||
|
:class:`StmtCorruptRemark`
|
||||||
"""
|
"""
|
||||||
for s in self.event_statements:
|
for s in self.event_statements:
|
||||||
if type(s) is StmtUnrecognized:
|
if type(s) is StmtUnrecognized or type(s) in StmtCorruptRemark:
|
||||||
yield s
|
yield s
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user