def _get_span_events(self, leaf): annotations = leaf._get_indicators(dict) detach(dict, leaf) annotations = [x for x in annotations if 'post events' in x] if annotations: return annotations[0]['post events'] return {}
def _get_span_events(self, leaf): annotations = leaf._get_indicators(dict) detach(dict, leaf) annotations = [x for x in annotations if "post events" in x] if annotations: return annotations[0]["post events"] return {}
def _cleanup(self, parsed): container = core.Container() for x in parsed: container.append(x) parsed = container leaves = select(parsed).leaves() if leaves: self._attach_indicators(leaves) for leaf in leaves: detach(dict, leaf) if 1 < self._toplevel_component_count: return parsed return parsed[0]
def _cleanup(self, parsed): container = core.Container() for x in parsed: container.append(x) parsed = container leaves = select(parsed).leaves() if leaves: self._attach_indicators(leaves) for leaf in leaves: detach(dict, leaf) if 1 < self._toplevel_component_count: return parsed return parsed[0]
def _cleanup(self, parsed): import abjad container = core.Container() for x in parsed: container.append(x) parsed = container leaves = abjad.select(parsed).leaves() if leaves: self._apply_spanners(leaves) for leaf in leaves: detach(dict, leaf) if 1 < self._toplevel_component_count: return parsed return parsed[0]