Files
dvc/dvc/utils/serialize/_common.py
T
Saugat Pachhai 14745039a4 Move to yaml1.2 (#4415)
* use yaml 1.2 everywhere

This commit:
* gets rid of pyyaml
* uses ruamel everywhere
* tries to unite toml and yaml

However, this will require a few more changes that will come soonish.
Eg: Current `parse_yaml` and `parse_toml` behavior could be error-prone,
so, it's better to introduce `tree` inside these serialization methods
(which I will try to tackle next).

Another is, yaml load can be slow for json. We could speed it up just by
using `json.load(s)` here (also in upcoming patch).

* Fix tests
2020-08-19 17:56:38 +03:00

13 lines
314 B
Python

"""Common utilities for serialize."""
from dvc.exceptions import DvcException
from dvc.utils import relpath
class ParseError(DvcException):
"""Errors while parsing files"""
def __init__(self, path, message):
path = relpath(path)
super().__init__(f"unable to read: '{path}', {message}")