# schema_salad.sourceline

## Attributes

`lineno_re` |

## Classes

`SourceLine` |

## Functions

`relname`(source) |
`add_lc_filename`(r, source) |
`reflow_all`(text[, maxline]) |
`reflow`(text, maxline[, shift]) |
`indent`(v[, nolead, shift, bullet]) |
`bullets`(textlist, bul) | Indent using the specified number of bullets.
`strip_duplicated_lineno`(text) | Strip duplicated line numbers.
`strip_dup_lineno`(text[, maxline]) |
`cmap`(d[, lc, fn]) |

## Module Contents

schema_salad.sourceline.lineno_re

schema_salad.sourceline.relname(source)
  Parameters:

    source (str)

  Return type:

    str

schema_salad.sourceline.add_lc_filename(r, source)
  Parameters:

    - r (ruamel.yaml.comments.CommentedBase)

    - source (str)

  Return type:

    None

schema_salad.sourceline.reflow_all(text, maxline=None)
  Parameters:

    - text (str)

    - maxline (Optional[int])

  Return type:

    str

schema_salad.sourceline.reflow(text, maxline, shift='')
  Parameters:

    - text (str)

    - maxline (int)

    - shift (Optional[str])

  Return type:

    str

schema_salad.sourceline.indent(v, nolead=False, shift=' ', bullet=' ')
  Parameters:

    - v (str)

    - nolead (bool)

    - shift (str)

    - bullet (str)

  Return type:

    str

schema_salad.sourceline.bullets(textlist, bul)

  Indent using the specified number of bullets.

  Parameters:

    - textlist (list[str])

    - bul (str)

  Return type:

    str

schema_salad.sourceline.strip_duplicated_lineno(text)

  Strip duplicated line numbers.

  Same as `strip_dup_lineno()` but without reflow.

  Parameters:

    text (str)

  Return type:

    str

schema_salad.sourceline.strip_dup_lineno(text, maxline=None)
  Parameters:

    - text (str)

    - maxline (Optional[int])

  Return type:

    str

schema_salad.sourceline.cmap(d, lc=None, fn=None)
  Parameters:

    - d (Union[int, float, str, collections.abc.MutableMapping[str, Any], collections.abc.MutableSequence[Any], None])

    - lc (Optional[list[int]])

    - fn (Optional[str])

  Return type:

    Union[int, float, str, ruamel.yaml.comments.CommentedMap, ruamel.yaml.comments.CommentedSeq, None]

class schema_salad.sourceline.SourceLine(item, key=None, raise_type=str, include_traceback=False)
  Parameters:

    - item (Any)

    - key (Optional[Any])

    - raise_type (Callable[[str], Any])

    - include_traceback (bool)

  item
  key
  raise_type
  include_traceback
  __enter__()
    Return type:

      SourceLine

  __exit__(exc_type, exc_value, tb)
    Parameters:

      - exc_type (Any)

      - exc_value (Any)

      - tb (Any)

    Return type:

      None

  file()
    Return type:

      Optional[str]

  start()

    Determine the starting location.

    Return type:

      Optional[tuple[int, int]]

  end()

    Empty, for now.

    Return type:

      Optional[tuple[int, int]]

  makeLead()
    Return type:

      str

  makeError(msg)
    Parameters:

      msg (str)

    Return type:

      Any