summaryrefslogtreecommitdiff
path: root/anchor.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2020-01-30 10:59:27 +0100
committerAnthon van der Neut <anthon@mnt.org>2020-01-30 10:59:27 +0100
commit10c6a6b07ee92ee797460fbe8207abe0669e25bf (patch)
tree7e0c6e2bb95065c90b5a02d042e4c128ae82f158 /anchor.py
parent1d7c8bd627dff124687111dc2125e9f1588f2f49 (diff)
downloadruamel.yaml-10c6a6b07ee92ee797460fbe8207abe0669e25bf.tar.gz
fix issue with mypy, dumping lit scalar in sequence0.16.7
Diffstat (limited to 'anchor.py')
-rw-r--r--anchor.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/anchor.py b/anchor.py
index 8d3c1ae..aa649f5 100644
--- a/anchor.py
+++ b/anchor.py
@@ -1,4 +1,6 @@
+if False: # MYPY
+ from typing import Any, Dict, Optional, List, Union, Optional, Iterator # NOQA
anchor_attrib = '_yaml_anchor'
@@ -13,5 +15,6 @@ class Anchor(object):
self.always_dump = False
def __repr__(self):
- ad = ", (always dump)" if self.always_dump else ""
- return "Anchor({!r}{})".format(self.value, ad)
+ # type: () -> Any
+ ad = ', (always dump)' if self.always_dump else ""
+ return 'Anchor({!r}{})'.format(self.value, ad)