From c6c7a98673690f6c46c80c88ba2909b7721fd40a Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Mon, 13 Aug 2018 11:15:32 +0200 Subject: fix issue 102 now also for empty mappings with comments *When this change indeed resolves your problem, please **Close** this issue*. *(You can do so usingthe WorkFlow pull-down (close to the top right of this page)* --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 4afaa78..f71a87d 100644 --- a/main.py +++ b/main.py @@ -640,7 +640,7 @@ class YAML(object): return cls def parse(self, stream): - # type: (StreamTextType, Any) -> Any + # type: (StreamTextType) -> Any """ Parse a YAML stream and produce parsing events. """ @@ -920,11 +920,11 @@ def load(stream, Loader=None, version=None, preserve_quotes=None): finally: loader._parser.dispose() try: - loader._reader.reset_reader() # type: ignore + loader._reader.reset_reader() except AttributeError: pass try: - loader._scanner.reset_scanner() # type: ignore + loader._scanner.reset_scanner() except AttributeError: pass @@ -945,11 +945,11 @@ def load_all(stream, Loader=None, version=None, preserve_quotes=None): finally: loader._parser.dispose() try: - loader._reader.reset_reader() # type: ignore + loader._reader.reset_reader() except AttributeError: pass try: - loader._scanner.reset_scanner() # type: ignore + loader._scanner.reset_scanner() except AttributeError: pass -- cgit v1.2.1