Skip to content

Commit

Permalink
Merge pull request #123 from espressif/fix/none_manifest_values
Browse files Browse the repository at this point in the history
  • Loading branch information
hfudev authored Feb 1, 2024
2 parents ae7efb3 + 8e5c92a commit 278a92d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ repos:
- pyparsing
- types-PyYAML
- types-toml
- pytest
- pytest<8 # 8.0.0 does not support python 3.7
4 changes: 4 additions & 0 deletions idf_build_apps/yaml/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def parse_postfixes(manifest_dict: t.Dict):
for folder, folder_rule in manifest_dict.items():
if folder.startswith('.'):
continue

if not folder_rule:
continue

updated_folder: t.Dict = {}
sorted_keys = sorted(folder_rule)
for key in sorted_keys:
Expand Down
10 changes: 10 additions & 0 deletions tests/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ def test_manifest_with_anchor(tmpdir, monkeypatch):

def test_manifest_with_anchor_and_postfix(tmpdir, monkeypatch):
yaml_file = tmpdir / 'test.yml'

yaml_file.write_text(
"""
foo:
""",
encoding='utf8',
)
manifest = Manifest.from_file(yaml_file)
assert manifest.enable_build_targets('foo') == sorted(SUPPORTED_TARGETS)

yaml_file.write_text(
"""
.base_depends_components: &base-depends-components
Expand Down

0 comments on commit 278a92d

Please sign in to comment.