Skip to content

Commit

Permalink
fixing broken refs in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertohasnofb committed Dec 30, 2023
1 parent c5e7a01 commit c46571a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
20 changes: 10 additions & 10 deletions auxjad/select/logical_selections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ def _group_consecutive_rests(logical_tie: abjad.LogicalTie,
r"""Private function used by |auxjad.select.logical_selections()| in order
to group consecutive ties together. If a logical tie is made out of a rest,
this function returns the value ``True``, otherwise it returns the logical
tie's head object itself. When this output is used with |abjad.group_by()|,
consecutive ``True`` values will be grouped together, thus selecting
consecutive rests as a single 'logical selection'. Meanwhile, non-rest
logical ties will return their individual unique head object, maintaining
their individual selections as is.
tie's head object itself. When this output is used with
|abjad.select.group_by()|, consecutive ``True`` values will be grouped
together, thus selecting consecutive rests as a single 'logical selection'.
Meanwhile, non-rest logical ties will return their individual unique head
object, maintaining their individual selections as is.
"""
if isinstance(logical_tie.head, (abjad.Rest, abjad.MultimeasureRest)):
return True
else:
return logical_tie.head


def logical_selections(music: Union[abjad.Container, abjad.Selection],
def logical_selections(container: Union[abjad.Container, abjad.Selection],
) -> abjad.Selection:
r"""Takes an |abjad.Container| (or child class).
Returns the logical selections of a container, that is the logical
Expand Down Expand Up @@ -68,12 +68,12 @@ def logical_selections(music: Union[abjad.Container, abjad.Selection],
Selection([Rest('r8.'), MultimeasureRest('R1'), Rest('r4..')])
Selection([Note("d'16"), Note("d'2.")])
"""
if not isinstance(music, (abjad.Container, abjad.Selection)):
if not isinstance(container, (abjad.Container, abjad.Selection)):
raise TypeError("Argument must be 'abjad.Container', 'abjad.Selection'"
", or child classes")
if isinstance(music, abjad.Container):
if not abjad.select(music).leaves().are_contiguous_logical_voice():
if isinstance(container, abjad.Container):
if not abjad.select(container).leaves().are_contiguous_logical_voice():
raise ValueError("Argument must be contiguous logical voice")

logical_ties = abjad.select(music).logical_ties()
logical_ties = abjad.select(container).logical_ties()
return logical_ties.group_by(_group_consecutive_rests)
3 changes: 2 additions & 1 deletion docs/api/abjad-targets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@
.. |abjad.select| replace:: :mod:`abjad.select <abjad.select>`
.. |abjad.select()| replace:: :func:`abjad.select() <abjad.select.select>`
.. |abjad.logical_ties()| replace:: :func:`abjad.logical_ties() <abjad.select.logical_ties>`
.. |abjad.group_by()| replace:: :func:`abjad.group_by() <abjad.select.group_by>`
.. |abjad.select.logical_ties()| replace:: :func:`abjad.select.logical_ties() <abjad.select.logical_ties>`
.. |abjad.select.group_by()| replace:: :func:`abjad.select.group_by() <abjad.select.group_by>`
.. |abjad.DurationInequality| replace:: :class:`abjad.DurationInequality <abjad.select.DurationInequality>`
.. |abjad.Inequality| replace:: :class:`abjad.Inequality <abjad.select.Inequality>`
.. |abjad.LengthInequality| replace:: :class:`abjad.LengthInequality <abjad.select.LengthInequality>`
Expand Down
4 changes: 2 additions & 2 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Auxjad API
==========

Auxjad is made out of nine subpackages: |core|_, |get|_, |indicators|_,
|makers|_, |mutate|_, |score|_, |select_|, |spanners|_, and |utilities|_.
|makers|_, |mutate|_, |score|_, |select|_, |spanners|_, and |utilities|_.

|core|_ contains most of Auxjad's classes and is focused on algorithmic
transformations and manipulations of |abjad.Container| objects. |indicators|_
and |spanners|_ contain derived classes and extension methods for Abjad's
indicators and spanners. |score|_ contains score component classes, such as
harmonic leaves. |makers|_ contain an expanded leaf making class. |get|_,
|mutate|_, and |select_| contain inspection, selection, and mutation functions,
|mutate|_, and |select|_ contain inspection, selection, and mutation functions,
respectively. |utilities|_ contain general utility functions..

.. note::
Expand Down

0 comments on commit c46571a

Please sign in to comment.