diff --git a/_test/test_bools.py b/_test/test_bools.py index d6620b3..3ed4085 100644 --- a/_test/test_bools.py +++ b/_test/test_bools.py @@ -1,16 +1,17 @@ +import io +from typing import Any, Dict, List, Text # NOQA import pytest -import io -import ruyaml # NOQA -from .roundtrip import round_trip, dedent +import ruyaml # NOQA from ruyaml import YAML -from ruyaml.util import load_yaml_guess_indent -from ruyaml.scalarbool import ScalarBoolean from ruyaml.comments import CommentedSeq -from ruyaml.representer import RoundTripRepresenter, ScalarNode from ruyaml.constructor import RoundTripConstructor -from typing import Text, Any, Dict, List # NOQA +from ruyaml.representer import RoundTripRepresenter, ScalarNode +from ruyaml.scalarbool import ScalarBoolean +from ruyaml.util import load_yaml_guess_indent + +from .roundtrip import dedent, round_trip def round_trip_stabler( @@ -31,7 +32,6 @@ def round_trip_stabler( class TestStability: - def test_lowercase_boolean(self): round_trip( """ diff --git a/lib/ruyaml/main.py b/lib/ruyaml/main.py index fd0a4fb..7cf16a7 100644 --- a/lib/ruyaml/main.py +++ b/lib/ruyaml/main.py @@ -243,9 +243,11 @@ def constructor(self): # type: () -> Any attr = '_' + sys._getframe().f_code.co_name if not hasattr(self, attr): - cnst = self.Constructor(preserve_quotes=self.preserve_quotes, - preserve_bools=self.preserve_bools, - loader=self) + cnst = self.Constructor( + preserve_quotes=self.preserve_quotes, + preserve_bools=self.preserve_bools, + loader=self, + ) cnst.allow_duplicate_keys = self.allow_duplicate_keys setattr(self, attr, cnst) return getattr(self, attr)