From 313121f1489cf8cf4dc643ca7280650939368cef Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Thu, 23 Aug 2018 13:29:47 +0200 Subject: remove erroneous version from CHANGES, update use of LiteralScalarString --- CHANGES | 6 ------ _test/test_string.py | 4 ++-- scalarstring.py | 4 +++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index ddadfe8..0880331 100644 --- a/CHANGES +++ b/CHANGES @@ -4,12 +4,6 @@ - update of C code - speed up of scanning (~30% depending on the input) -[0, 16, 0]: 2018-08-23 - - initial support for round-tripping folded style scalars (initially requested - by `Johnathan Viduchinsky `__) - - update of C code - - speed up of scanning (~30% depending on the input) - [0, 15, 60]: 2018-08-18 - cleanup for mypy - spurious print in library (reported by diff --git a/_test/test_string.py b/_test/test_string.py index b9fe1ae..d1f7982 100644 --- a/_test/test_string.py +++ b/_test/test_string.py @@ -22,7 +22,7 @@ import platform from roundtrip import round_trip, dedent, round_trip_load, round_trip_dump # NOQA -class TestPreservedScalarString: +class TestLiteralScalarString: def test_basic_string(self): round_trip(""" a: abcdefg @@ -153,7 +153,7 @@ class TestReplace: """) data = round_trip_load(s, preserve_quotes=True) so = data['foo'].replace('foo', 'bar', 2) - assert isinstance(so, ruamel.yaml.scalarstring.PreservedScalarString) + assert isinstance(so, ruamel.yaml.scalarstring.LiteralScalarString) assert so == dedent(""" bar bar diff --git a/scalarstring.py b/scalarstring.py index a701f11..18dcc15 100644 --- a/scalarstring.py +++ b/scalarstring.py @@ -13,7 +13,9 @@ __all__ = [ 'FoldedScalarString', 'SingleQuotedScalarString', 'DoubleQuotedScalarString', - 'PreservedScalarString', + # PreservedScalarString is the old name, as it was the first to be preserved on rt, + # use LiteralScalarString instead + 'PreservedScalarString', ] -- cgit v1.2.1