Skip to content

Commit

Permalink
Extended Spanner._get_indicators() with name=None keyword.
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorbaca committed Jul 31, 2017
1 parent 599f47b commit 4dcdbf3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion abjad/tools/spannertools/Spanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _get_format_specification(self):
storage_format_kwargs_names=names,
)

def _get_indicators(self, prototype=None, unwrap=True):
def _get_indicators(self, prototype=None, name=None, unwrap=True):
from abjad.tools import indicatortools
prototype = prototype or (object,)
if not isinstance(prototype, tuple):
Expand All @@ -377,6 +377,8 @@ def _get_indicators(self, prototype=None, unwrap=True):
prototype_classes = tuple(prototype_classes)
matching_indicators = []
for indicator in self._indicator_expressions:
if name is not None and indicator._name != name:
continue
if isinstance(indicator, prototype_classes):
matching_indicators.append(indicator)
elif any(indicator == x for x in prototype_objects):
Expand Down

0 comments on commit 4dcdbf3

Please sign in to comment.