diff options
-rw-r--r-- | __init__.py | 6 | ||||
-rw-r--r-- | _test/test_string.py | 2 | ||||
-rw-r--r-- | main.py | 4 | ||||
-rw-r--r-- | scanner.py | 5 |
4 files changed, 6 insertions, 11 deletions
diff --git a/__init__.py b/__init__.py index 108e02c..6bf5b91 100644 --- a/__init__.py +++ b/__init__.py @@ -60,11 +60,7 @@ _package_data = dict( 'Topic :: Text Processing :: Markup', ], keywords='yaml 1.2 parser round-trip preserve quotes order config', - wheels=dict( - windows='appveyor', - linux='libyaml-devel', - macos='builder@macos', - ), + wheels=dict(windows='appveyor', linux='libyaml-devel', macos='builder@macos'), read_the_docs='yaml', supported=[(2, 7), (3, 4)], # minimum tox=dict( diff --git a/_test/test_string.py b/_test/test_string.py index 5aba3ef..47970cf 100644 --- a/_test/test_string.py +++ b/_test/test_string.py @@ -179,6 +179,7 @@ class TestWalkTree: def test_basic(self): from ruamel.yaml.comments import CommentedMap from ruamel.yaml.scalarstring import walk_tree + data = CommentedMap() data[1] = 'a' data[2] = 'with\nnewline\n' @@ -197,6 +198,7 @@ class TestWalkTree: from ruamel.yaml.scalarstring import walk_tree, preserve_literal from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dq from ruamel.yaml.scalarstring import SingleQuotedScalarString as sq + data = CommentedMap() data[1] = 'a' data[2] = 'with\nnew : line\n' @@ -166,14 +166,14 @@ class YAML(object): return self._reader except AttributeError: self._reader = self.Reader(None, loader=self) - return self._reader + return self._reader @property def scanner(self): # type: () -> Any try: return self._scanner - except: + except AttributeError: self._scanner = self.Scanner(loader=self) return self._scanner @@ -146,15 +146,12 @@ class Scanner(object): # type: () -> Any try: return self._scanner_reader - except: + except AttributeError: if hasattr(self.loader, 'typ'): self._scanner_reader = self.loader.reader else: self._scanner_reader = self.loader._reader return self._scanner_reader - #if hasattr(self.loader, 'typ'): - # self.loader.reader - #return self.loader._reader @property def scanner_processing_version(self): # prefix until un-composited |