Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterzwerink authored Jan 17, 2024
1 parent 981cbb5 commit 21b34e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions omegaconf/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@
from yaml import CDumper

BaseDumper = CDumper
BaseDumperType: Type[CDumper] = type(CDumper)
except ImportError: # pragma: no cover
BaseDumper = yaml.Dumper
BaseDumperType: Type[yaml.Dumper] = type(yaml.Dumper)

NoneType: Type[None] = type(None)

Expand Down Expand Up @@ -118,7 +116,7 @@ class OmegaConfDumper(BaseDumper): # type: ignore
str_representer_added = False

@staticmethod
def str_representer(dumper: BaseDumperType, data: str) -> yaml.ScalarNode:
def str_representer(dumper: yaml.Dumper, data: str) -> yaml.ScalarNode:
with_quotes = yaml_is_bool(data) or is_int(data) or is_float(data)
return dumper.represent_scalar(
yaml.resolver.BaseResolver.DEFAULT_SCALAR_TAG,
Expand Down

0 comments on commit 21b34e4

Please sign in to comment.