def _get_format_specification(self): items = [] if self.item_class.__name__.startswith('Named'): items = [str(x) for x in self] elif hasattr(self.item_class, 'pitch_number'): items = [x.pitch_number for x in self] elif hasattr(self.item_class, 'pitch_class_number'): items = [x.pitch_class_number for x in self] elif self.item_class.__name__.startswith('Numbered'): items = [ mathtools.integer_equivalent_number_to_integer(float(x.number)) for x in self ] elif hasattr(self.item_class, '__abs__'): items = [abs(x) for x in self] else: message = 'invalid item class: {!r}.' message = message.format(self.item_class) raise ValueError(message) return systemtools.FormatSpecification( client=self, repr_is_indented=False, repr_kwargs_names=['name'], repr_args_values=[items], storage_format_args_values=[tuple(self._collection)], )
def _get_format_specification(self): from abjad.tools import systemtools return systemtools.FormatSpecification( client=self, repr_is_indented=False, storage_format_args_values=[self.address] + list(self.contents), )
def _get_format_specification(self): return systemtools.FormatSpecification( self, repr_args_values=[], repr_is_indented=False, repr_kwargs_names=[], )
def _get_format_specification(self): values = [self.symbol] return systemtools.FormatSpecification( client=self, storage_format_args_values=values, storage_format_kwargs_names=[], )
def _get_format_specification(self): from abjad.tools import systemtools slot_contribution_names = ( 'absolute_before', 'absolute_after', 'before', 'after', 'opening', 'closing', 'right', ) grob_contribution_names = ( 'context_settings', 'grob_overrides', 'grob_reverts', ) names = [ x for x in slot_contribution_names if getattr(self, x).has_contributions ] names.extend(x for x in grob_contribution_names if getattr(self, x)) return systemtools.FormatSpecification( client=self, storage_format_kwargs_names=names, )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, repr_args_values=[self.target_duration, self._contents_summary], storage_format_args_values=[self.target_duration, self[:]], storage_format_kwargs_names=[], )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, repr_is_indented=True, storage_format_args_values=[self.kernel], storage_format_kwargs_names=[], )
def _get_format_specification(self): storage_format_text = repr_text = self._representation or None return systemtools.FormatSpecification( client=self, repr_text=repr_text, storage_format_text=storage_format_text, )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, repr_is_indented=False, storage_format_args_values=(self.command,) + self.args, storage_format_kwargs_names=[], )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, storage_format_args_values=[self.numbers], storage_format_is_indented=False, storage_format_kwargs_names=[], )
def _get_format_specification(self): agent = systemtools.StorageFormatAgent(self) names = agent.signature_names return systemtools.FormatSpecification( client=self, repr_is_indented=True, template_names=names, )
def _get_format_specification(self): values = [self.name] + list(self.arguments or ()) return systemtools.FormatSpecification( client=self, storage_format_args_values=values, storage_format_is_indented=False, storage_format_kwargs_names=[], )
def _get_format_specification(self): from abjad.tools import systemtools return systemtools.FormatSpecification( repr_is_bracketed=True, storage_format_is_bracketed=True, storage_format_is_indented=False, storage_format_args_values=[self.actual_name], storage_format_kwargs_names=[])
def _get_format_specification(self): from abjad.tools import systemtools return systemtools.FormatSpecification( client=self, repr_is_bracketed=True, storage_format_is_bracketed=True, storage_format_kwargs_names=['buffer_id'], )
def _get_format_specification(self): values = [self.figured_bass_string] return systemtools.FormatSpecification( client=self, repr_is_indented=False, storage_format_is_indented=False, storage_format_args_values=values, )
def _get_format_specification(self): values = [] summary = self._contents_summary if summary: values.append(summary) return systemtools.FormatSpecification(client=self, repr_args_values=values, storage_format_kwargs_names=[])
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, storage_format_args_values=[ self._value.numerator, self._value.denominator, ], storage_format_kwargs_names=[], )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, repr_is_indented=False, storage_format_args_values=[ self._tempo_indication, self._proportional_notation_duration, ], )
def _get_format_specification(self): from abjad.tools import systemtools agent = systemtools.StorageFormatManager(self) names = agent.signature_names return systemtools.FormatSpecification( client=self, repr_is_indented=True, template_names=names, )
def _get_format_specification(self): values = [] if self.sequence: values.append(self.sequence) return systemtools.FormatSpecification( client=self, storage_format_args_values=values, storage_format_kwargs_names=[], )
def _get_format_specification(self): repr_items = self._get_sorted_repr_items() return systemtools.FormatSpecification( client=self, repr_is_indented=False, repr_args_values=[repr_items], storage_format_args_values=[repr_items], storage_format_kwargs_names=[], )
def _get_format_specification(self): values = self._value if datastructuretools.String.is_string(self._value): values = [self._value] return systemtools.FormatSpecification( client=self, storage_format_args_values=values, storage_format_kwargs_names=[], )
def _get_format_specification(self): values = [self.name] if self.direction is not None: values.append(self.direction) return systemtools.FormatSpecification( client=self, storage_format_args_values=values, storage_format_is_indented=False, )
def _get_format_specification(self): from abjad.tools import systemtools agent = systemtools.StorageFormatAgent(self) names = agent.signature_keyword_names names.extend(sorted(self._kwargs)) return systemtools.FormatSpecification( client=self, repr_is_indented=True, storage_format_kwargs_names=names, )
def _get_format_specification(self): values = [self.number] if self.accidental.is_adjusted: values = [self.accidental.name, self.number] return systemtools.FormatSpecification( client=self, repr_is_indented=False, storage_format_is_indented=False, storage_format_args_values=values, )
def _get_format_specification(self): summary = self._compact_representation return systemtools.FormatSpecification( client=self, repr_is_indented=False, repr_args_values=[summary], storage_format_args_values=[format(self, 'lilypond')], storage_format_is_indented=False, storage_format_kwargs_names=[], )
def _get_format_specification(self): values = [] if self.q_event: values.append(self.q_event) if self.offset: values.append(self.offset) return systemtools.FormatSpecification( client=self, storage_format_args_values=values, )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, storage_format_args_values=self.items or (), storage_format_kwargs_names=[ 'beatspan', 'search_tree', 'tempo', ], )
def _get_format_specification(self): return systemtools.FormatSpecification( client=self, repr_is_indented=False, storage_format_is_indented=False, storage_format_args_values=[ str(self.key_signature.tonic), self.key_signature.mode.mode_name, ], )
def _get_format_specification(self): from abjad.tools import systemtools agent = systemtools.StorageFormatAgent(self) names = list(agent.signature_keyword_names) for name in names[:]: if not getattr(self, name): names.remove(name) return systemtools.FormatSpecification( client=self, storage_format_kwargs_names=names, )