3333from ._deprecated import HelpFormatterDeprecations
3434from ._link_arguments import ActionLink
3535from ._namespace import Namespace , NSKeyError
36- from ._optionals import import_ruyaml
37- from ._type_checking import ArgumentParser , ruyamlCommentedMap
36+ from ._optionals import import_ruamel
37+ from ._type_checking import ArgumentParser , ruamelCommentedMap
3838from ._typehints import ActionTypeHint , type_to_str
3939
4040__all__ = ["DefaultHelpFormatter" ]
@@ -63,7 +63,7 @@ def __init__(self, help_formatter: HelpFormatter):
6363
6464 def add_yaml_comments (self , cfg : str ) -> str :
6565 """Adds help text as yaml comments."""
66- ruyaml = import_ruyaml ("add_yaml_comments" )
66+ ruyaml = import_ruamel ("add_yaml_comments" )
6767 yaml = ruyaml .YAML ()
6868 cfg = yaml .load (cfg )
6969
@@ -119,28 +119,28 @@ def set_comments(cfg, prefix="", depth=0):
119119 def set_yaml_start_comment (
120120 self ,
121121 text : str ,
122- cfg : ruyamlCommentedMap ,
122+ cfg : ruamelCommentedMap ,
123123 ):
124- """Sets the start comment to a ruyaml object.
124+ """Sets the start comment to a ruamel.yaml object.
125125
126126 Args:
127127 text: The content to use for the comment.
128- cfg: The ruyaml object.
128+ cfg: The ruamel.yaml object.
129129 """
130130 cfg .yaml_set_start_comment (text )
131131
132132 def set_yaml_group_comment (
133133 self ,
134134 text : str ,
135- cfg : ruyamlCommentedMap ,
135+ cfg : ruamelCommentedMap ,
136136 key : str ,
137137 depth : int ,
138138 ):
139- """Sets the comment for a group to a ruyaml object.
139+ """Sets the comment for a group to a ruamel.yaml object.
140140
141141 Args:
142142 text: The content to use for the comment.
143- cfg: The parent ruyaml object.
143+ cfg: The parent ruamel.yaml object.
144144 key: The key of the group.
145145 depth: The nested level of the group.
146146 """
@@ -149,15 +149,15 @@ def set_yaml_group_comment(
149149 def set_yaml_argument_comment (
150150 self ,
151151 text : str ,
152- cfg : ruyamlCommentedMap ,
152+ cfg : ruamelCommentedMap ,
153153 key : str ,
154154 depth : int ,
155155 ):
156- """Sets the comment for an argument to a ruyaml object.
156+ """Sets the comment for an argument to a ruamel.yaml object.
157157
158158 Args:
159159 text: The content to use for the comment.
160- cfg: The parent ruyaml object.
160+ cfg: The parent ruamel.yaml object.
161161 key: The key of the argument.
162162 depth: The nested level of the argument.
163163 """
0 commit comments