homes/common/.local/lib/python2.7/site-packages/powerline/lint/markedjson/__init__.py

18 lines
304 B
Python

__version__ = '3.10'
from .loader import Loader
def load(stream, Loader=Loader):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
"""
loader = Loader(stream)
try:
r = loader.get_single_data()
return r, loader.haserrors
finally:
loader.dispose()