Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 29, 2024
1 parent 0a12be2 commit 08e16dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
16 changes: 8 additions & 8 deletions _test/test_bools.py
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -31,7 +32,6 @@ def round_trip_stabler(


class TestStability:

def test_lowercase_boolean(self):
round_trip(
"""
Expand Down
8 changes: 5 additions & 3 deletions lib/ruyaml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 08e16dc

Please sign in to comment.