From 10c6a6b07ee92ee797460fbe8207abe0669e25bf Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Thu, 30 Jan 2020 10:59:27 +0100 Subject: fix issue with mypy, dumping lit scalar in sequence --- anchor.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'anchor.py') 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) -- cgit v1.2.1