Skip to content

Commit 50f9f12

Browse files
committed
Fix test issues
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
1 parent d65e567 commit 50f9f12

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

fmf/base.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,7 @@ def update(self, data: Optional[TreeData]) -> None:
338338
# Handle fmf directives first
339339
try:
340340
directives = data.pop("/")
341-
assert isinstance(directives, dict)
342-
self._process_directives(directives)
341+
self._process_directives(directives) # type: ignore
343342
except KeyError:
344343
pass
345344

@@ -497,8 +496,11 @@ def child(self, name: str, data: Optional[TreeDataPath],
497496
# Save source file
498497
if source is not None:
499498
self.children[name].sources.append(source)
500-
assert isinstance(data, dict)
501-
self.children[name]._raw_data = copy.deepcopy(data)
499+
if data is None:
500+
self.children[name]._raw_data = {}
501+
else:
502+
assert isinstance(data, dict)
503+
self.children[name]._raw_data = copy.deepcopy(data)
502504

503505
def grow(self, path: str) -> None:
504506
"""
@@ -692,7 +694,7 @@ def node(reference: TreeData) -> Tree:
692694
if 'url' in reference:
693695
tree = utils.fetch_tree(
694696
str(reference.get('url')),
695-
str(reference.get('ref')),
697+
reference.get('ref'), # type: ignore
696698
str(reference.get('path', '.')).lstrip('/'))
697699
# Use local files
698700
else:

0 commit comments

Comments
 (0)