7171 is_meta_key ,
7272 patch_namespace ,
7373 recreate_branches ,
74+ remove_meta ,
7475 split_key ,
7576 split_key_leaf ,
7677 split_key_root ,
77- strip_meta ,
7878)
7979from ._optionals import (
8080 _get_config_read_mode ,
@@ -393,7 +393,7 @@ def _parse_common(
393393 self .validate (cfg , skip_required = skip_required )
394394
395395 if not (with_meta or (with_meta is None and self ._default_meta )):
396- cfg = strip_meta ( cfg )
396+ cfg = cfg . clone ( with_meta = False )
397397
398398 return cfg
399399
@@ -793,7 +793,7 @@ def dump(
793793 skip_validation = deprecated_skip_check (ArgumentParser .dump , kwargs , skip_validation )
794794 check_valid_dump_format (format )
795795
796- cfg = strip_meta ( cfg )
796+ cfg = cfg . clone ( with_meta = False )
797797
798798 with parser_context (load_value_mode = self .parser_mode ):
799799 if not skip_validation :
@@ -926,7 +926,7 @@ def check_overwrite(path):
926926
927927 if not skip_validation :
928928 with parser_context (load_value_mode = self .parser_mode ):
929- self .validate (strip_meta ( cfg ), branch = branch )
929+ self .validate (cfg . clone ( with_meta = False ), branch = branch )
930930
931931 ActionLink .strip_link_target_keys (self , cfg )
932932
@@ -937,7 +937,7 @@ def is_path_action(key):
937937 def save_path (val ):
938938 val_path = Path (os .path .basename (val ["__path__" ].absolute ), mode = "fc" )
939939 check_overwrite (val_path )
940- val_out = strip_meta (val )
940+ val_out = remove_meta (val )
941941 if isinstance (val , Namespace ):
942942 val_out = val_out .as_dict ()
943943 if "__orig__" in val :
@@ -1258,7 +1258,7 @@ def instantiate_classes(
12581258 order = ActionLink .instantiation_order (self )
12591259 components = ActionLink .reorder (order , components )
12601260
1261- cfg = strip_meta ( cfg )
1261+ cfg = cfg . clone ( with_meta = False )
12621262 for component in components :
12631263 ActionLink .apply_instantiation_links (self , cfg , target = component .dest )
12641264 if isinstance (component , ActionTypeHint ):
0 commit comments