Skip to content

Commit

Permalink
docstring fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Jul 24, 2023
1 parent 2700538 commit 1c50152
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions miditok/midi_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def convert_sequence_to_tokseq(
complete_seq: bool = True,
decode_bpe: bool = True
) -> Union[TokSequence, List[TokSequence]]:
r"""Converts a sequence into a **:class:`miditok.TokSequence`** or list of **:class:`miditok.TokSequence`**
r"""Converts a sequence into a :class:`miditok.TokSequence` or list of :class:`miditok.TokSequence`
objects with the appropriate format of the tokenizer being used.
:param tokenizer: tokenizer being used with the sequence.
Expand Down Expand Up @@ -110,8 +110,8 @@ def convert_sequence_to_tokseq(


def _in_as_seq(complete: bool = True, decode_bpe: bool = True):
r"""Decorator creating if necessary and completing a TokSequence object before that the function is called.
This decorator is made to be used by the :py:meth:`miditok.MIDITokenizer.tokens_to_midi` method.
r"""Decorator creating if necessary and completing a :class:`miditok.TokSequence` object before that the function
is called. This decorator is made to be used by the :py:meth:`miditok.MIDITokenizer.tokens_to_midi` method.
:param complete: will complete the sequence, i.e. complete its ``ids`` , ``tokens`` and ``events`` .
:param decode_bpe: will decode BPE, if applicable. This step is performed before completing the sequence.
Expand Down Expand Up @@ -145,7 +145,7 @@ def wrapper(*args, **kwargs):


def _out_as_complete_seq(function: Callable):
"""Decorator completing an output Sequence object."""
r"""Decorator completing an output :class:`miditok.TokSequence` object."""

def wrapper(*args, **kwargs):
self = args[0]
Expand Down

0 comments on commit 1c50152

Please sign in to comment.