mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 08:50:54 +00:00
Improved __repr__() methods
This commit is contained in:
@@ -38,12 +38,12 @@ class CmxEvent:
|
||||
self.transition.name = statement.name
|
||||
|
||||
def __repr__(self):
|
||||
return f"""CmxEvent(title="{self.title}",number={self.number},\
|
||||
clip_name="{self.clip_name}",source_name="{self.source_name}",\
|
||||
channels={self.channels},transition={self.transition},\
|
||||
source_start="{self.source_start}",source_finish="{self.source_finish}",\
|
||||
record_start="{self.source_start}",record_finish="{self.record_finish}",\
|
||||
fcm_drop={self.fcm_drop},remarks={self.remarks})"""
|
||||
return f"""CmxEvent(title={self.title.__repr__()},number={self.number.__repr__()},\
|
||||
clip_name={self.clip_name.__repr__()},source_name={self.source_name.__repr__()},\
|
||||
channels={self.channels.__repr__()},transition={self.transition.__repr__()},\
|
||||
source_start={self.source_start.__repr__()},source_finish={self.source_finish.__repr__()},\
|
||||
record_start={self.source_start.__repr__()},record_finish={self.record_finish.__repr__()},\
|
||||
fcm_drop={self.fcm_drop.__repr__()},remarks={self.remarks.__repr__()},line_number={self.line_number.__repr__()})"""
|
||||
|
||||
|
||||
class CmxTransition:
|
||||
@@ -90,5 +90,5 @@ class CmxTransition:
|
||||
return self.transition == 'KO'
|
||||
|
||||
def __repr__(self):
|
||||
return f"""CmxTransition(transition="{self.transition}",operand="{self.operand}")"""
|
||||
return f"""CmxTransition(transition={self.transition.__repr__()},operand={self.operand.__repr__()})"""
|
||||
|
||||
|
||||
@@ -110,15 +110,12 @@ class CmxChannelMap:
|
||||
if matchresult:
|
||||
self.set_audio_channel(int( matchresult.group(1)), True )
|
||||
|
||||
|
||||
|
||||
|
||||
def appendExt(self, audio_ext):
|
||||
self.a3 = ext.audio3
|
||||
self.a4 = ext.audio4
|
||||
|
||||
def __repr__(self):
|
||||
return f"CmxChannelMap(v={self.v}, audio_channels={self._audio_channel_set})"
|
||||
return f"CmxChannelMap(v={self.v.__repr__()}, audio_channels={self._audio_channel_set.__repr__()})"
|
||||
|
||||
|
||||
def parse_cmx3600(file):
|
||||
@@ -155,7 +152,8 @@ def event_list(title, parser):
|
||||
source_finish= raw_event.source_out,
|
||||
record_start= raw_event.record_in,
|
||||
record_finish= raw_event.record_out,
|
||||
fcm_drop= state['fcm_drop'])
|
||||
fcm_drop= state['fcm_drop'],
|
||||
line_number = raw_event.line_number)
|
||||
elif parser.accept('AudioExt') or parser.accept('ClipName') or \
|
||||
parser.accept('SourceFile') or parser.accept('EffectsName') or \
|
||||
parser.accept('Remark'):
|
||||
|
||||
Reference in New Issue
Block a user