summaryrefslogtreecommitdiff
path: root/constructor.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2021-03-26 11:20:38 +0100
committerAnthon van der Neut <anthon@mnt.org>2021-03-26 11:20:38 +0100
commit09f8576ae990234daebf51cca48b52d564f2c2d2 (patch)
treee08953ec5547d9ed05373a3134c3557f6ebf11c6 /constructor.py
parente8719cd39655d98cf2bde1be15366cca7a58fd89 (diff)
downloadruamel.yaml-09f8576ae990234daebf51cca48b52d564f2c2d2.tar.gz
remove support for 2.7, prepare for f-strings0.17.0
Diffstat (limited to 'constructor.py')
-rw-r--r--constructor.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/constructor.py b/constructor.py
index 6c795c4..3fddba6 100644
--- a/constructor.py
+++ b/constructor.py
@@ -1014,13 +1014,9 @@ Constructor.add_constructor(
Constructor.add_constructor('tag:yaml.org,2002:python/int', Constructor.construct_yaml_int)
-Constructor.add_constructor(
- 'tag:yaml.org,2002:python/long', Constructor.construct_python_long
-)
+Constructor.add_constructor('tag:yaml.org,2002:python/long', Constructor.construct_python_long)
-Constructor.add_constructor(
- 'tag:yaml.org,2002:python/float', Constructor.construct_yaml_float
-)
+Constructor.add_constructor('tag:yaml.org,2002:python/float', Constructor.construct_yaml_float)
Constructor.add_constructor(
'tag:yaml.org,2002:python/complex', Constructor.construct_python_complex
@@ -1296,7 +1292,7 @@ class RoundTripConstructor(SafeConstructor):
seqtyp.yaml_set_anchor(node.anchor)
for idx, child in enumerate(node.value):
if child.comment:
- seqtyp._yaml_add_comment(child.comment[:], key=idx)
+ seqtyp._yaml_add_comment(child.comment, key=idx)
child.comment = None # if moved to sequence remove from child
ret_val.append(self.construct_object(child, deep=deep))
seqtyp._yaml_set_idx_line_col(