summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-23 13:29:47 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-23 13:29:47 +0200
commit313121f1489cf8cf4dc643ca7280650939368cef (patch)
tree903d546b42052713b5638b735e023959b6131b9f
parent6ebe313aa242978554ace43c33e0d05b7c7a26e3 (diff)
downloadruamel.yaml-313121f1489cf8cf4dc643ca7280650939368cef.tar.gz
remove erroneous version from CHANGES, update use of LiteralScalarString
-rw-r--r--CHANGES6
-rw-r--r--_test/test_string.py4
-rw-r--r--scalarstring.py4
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 <https://bitbucket.org/johnathanvidu/>`__)
- - 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',
]