mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-12 15:28:21 +01:00
* 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
13 lines
314 B
Python
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}")
|