Skip to content

bumpversion.yaml_dump ​

A simple YAML dumper to avoid extra dependencies.

DumperFunc ​

python
DumperFunc = Callable[[Any], str]

YAMLDumpers ​

python
class YAMLDumpers()

Registry of YAML dumpers.

add_dumper ​

python
def add_dumper(data_type: type, dumper: DumperFunc) -> None

Add a YAML dumper.

YAML_DUMPERS ​

python
YAML_DUMPERS = YAMLDumpers()

INDENT ​

python
INDENT = '  '

dump ​

python
def dump(data: Any) -> str

Dump a value to a string buffer.

format_str ​

python
def format_str(val: str) -> str

Return a YAML representation of a string.

format_int ​

python
def format_int(val: int) -> str

Return a YAML representation of an int.

format_float ​

python
def format_float(data: float) -> str

Return a YAML representation of a float.

format_bool ​

python
def format_bool(val: bool) -> str

Return a YAML representation of a bool.

format_dict ​

python
def format_dict(val: dict) -> str

Return a YAML representation of a dict.

format_sequence ​

python
def format_sequence(val: Union[list, tuple]) -> str

Return a string representation of a value.

format_none ​

python
def format_none(_: None) -> str

Return a YAML representation of None.

format_date ​

python
def format_date(val: datetime.date) -> str

Return a YAML representation of a date.

format_datetime ​

python
def format_datetime(val: datetime.datetime) -> str

Return a string representation of a value.

format_scminfo ​

python
def format_scminfo(val: SCMInfo) -> str

Return a string representation of a value.