MCPcopy
hub / github.com/csev/py4e / clean_indexes

Method clean_indexes

lectures/srt-split/pysrt/srtfile.py:128–137  ·  view source on GitHub ↗

clean_indexes() Sort subs and reset their index attribute. Should be called after destructive operations like split or such.

(self)

Source from the content-addressed store, hash-verified

126 item.shift(*args, **kwargs)
127
128 def clean_indexes(self):
129 """
130 clean_indexes()
131
132 Sort subs and reset their index attribute. Should be called after
133 destructive operations like split or such.
134 """
135 self.sort()
136 for index, item in enumerate(self):
137 item.index = index + 1
138
139 @property
140 def text(self):

Callers 1

splitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected