summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comments.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/comments.py b/comments.py
index 61c1f0e..237ffd3 100644
--- a/comments.py
+++ b/comments.py
@@ -1115,10 +1115,12 @@ class CommentedSet(MutableSet, CommentedBase): # type: ignore # NOQA
class TaggedScalar(CommentedBase):
# the value and style attributes are set during roundtrip construction
- def __init__(self):
+ def __init__(self, value=None, style=None, tag=None):
# type: () -> None
- self.value = None
- self.style = None
+ self.value = value
+ self.style = style
+ if tag is not None:
+ self.yaml_set_tag(tag)
def __str__(self):
# type: () -> Any