From 80815f1dc71bd9345a86260a85595a746ba9246b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 20 Aug 2026 16:12:52 -0500 Subject: [PATCH 1/2] Make parse_library_json public alongside its properties sibling --- esphome/platformio/library.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/platformio/library.py b/esphome/platformio/library.py index 771570f872..ccc4c3d36c 100644 --- a/esphome/platformio/library.py +++ b/esphome/platformio/library.py @@ -459,7 +459,7 @@ def check_library_data(data: dict, platform: str | None, framework: str): ) -def _parse_library_json(library_json_path: PathType): +def parse_library_json(library_json_path: PathType): """ Load and parse a JSON file describing a library. @@ -876,7 +876,7 @@ def convert_libraries( has_json = library_json_path.is_file() has_properties = library_properties_path.is_file() if has_json: - component.data = _parse_library_json(library_json_path) + component.data = parse_library_json(library_json_path) elif has_properties: component.data = parse_library_properties(library_properties_path) else: From 7fe0847e5c91e73691e3c29a8709c742d73f3f8a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 20 Aug 2026 16:13:19 -0500 Subject: [PATCH 2/2] Update espidf test to the public parse_library_json name --- tests/unit_tests/test_espidf_component.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/test_espidf_component.py b/tests/unit_tests/test_espidf_component.py index c4a910be23..b17136aa15 100644 --- a/tests/unit_tests/test_espidf_component.py +++ b/tests/unit_tests/test_espidf_component.py @@ -25,10 +25,10 @@ from esphome.platformio.library import ( GitSource, URLSource, _node_key, - _parse_library_json, _resolve_registry_version, collect_filtered_files, normalize_dependencies, + parse_library_json, parse_library_properties, split_list_by_condition, ) @@ -368,11 +368,11 @@ def test_generate_idf_component_yml_missing_path_raises(tmp_component): generate_idf_component_yml(tmp_component) -def test_parse_library_json(tmp_path): +def testparse_library_json(tmp_path): f = tmp_path / "library.json" f.write_text(json.dumps({"name": "test"})) - result = _parse_library_json(f) + result = parse_library_json(f) assert result["name"] == "test"