Skip to content

Commit c40e1ae

Browse files
authored
Merge pull request #57 from polm/fix/more-yaml-consistency
Don't re-use YAML object
2 parents bf4c27f + cea2cf6 commit c40e1ae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

srsly/_yaml_api.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ def dump(self, data, stream=None, **kw):
2525
return stream.getvalue()
2626

2727

28-
yaml = CustomYaml()
29-
30-
3128
def yaml_dumps(
3229
data: YAMLInput,
3330
indent_mapping: int = 2,
@@ -58,6 +55,7 @@ def yaml_loads(data: Union[str, IO]) -> YAMLOutput:
5855
data (str / file): The data to deserialize.
5956
RETURNS: The deserialized Python object.
6057
"""
58+
yaml = CustomYaml()
6159
try:
6260
return yaml.load(data)
6361
except Exception as e:

0 commit comments

Comments
 (0)