From e1739eda6d3ae0ffbf1e5e4ce7d2af988d934162 Mon Sep 17 00:00:00 2001 From: a-gardner1 Date: Thu, 10 Oct 2024 20:56:31 +0000 Subject: [PATCH] namespace_to_dict -> as_dict --- jsonargparse_tests/test_typehints.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jsonargparse_tests/test_typehints.py b/jsonargparse_tests/test_typehints.py index 6f4d7258..6e3761ec 100644 --- a/jsonargparse_tests/test_typehints.py +++ b/jsonargparse_tests/test_typehints.py @@ -35,7 +35,6 @@ import yaml from jsonargparse import ArgumentError, Namespace, lazy_instance -from jsonargparse._namespace import namespace_to_dict from jsonargparse._typehints import ( ActionTypeHint, NotRequired, @@ -663,7 +662,7 @@ def test_valid_unpack_typeddict_by_assumptions(parser, init_args): parser.add_argument("--testclass", type=MyTestInheritedUnpackClass) test_config = {"class_path": f"{__name__}.MyTestInheritedUnpackClass", "init_args": init_args} cfg = parser.parse_args([f"--testclass={json.dumps(test_config)}"]) - assert test_config == namespace_to_dict(cfg["testclass"]) + assert test_config == cfg["testclass"].as_dict() # also assert no issues with dumping if test_config["init_args"].get("b") is None: # parser.dump does not dump null b