Skip to content

Commit

Permalink
Fix test issues
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Aug 18, 2023
1 parent d65e567 commit 50f9f12
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fmf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ def update(self, data: Optional[TreeData]) -> None:
# Handle fmf directives first
try:
directives = data.pop("/")
assert isinstance(directives, dict)
self._process_directives(directives)
self._process_directives(directives) # type: ignore
except KeyError:
pass

Expand Down Expand Up @@ -497,8 +496,11 @@ def child(self, name: str, data: Optional[TreeDataPath],
# Save source file
if source is not None:
self.children[name].sources.append(source)
assert isinstance(data, dict)
self.children[name]._raw_data = copy.deepcopy(data)
if data is None:
self.children[name]._raw_data = {}
else:
assert isinstance(data, dict)
self.children[name]._raw_data = copy.deepcopy(data)

def grow(self, path: str) -> None:
"""
Expand Down Expand Up @@ -692,7 +694,7 @@ def node(reference: TreeData) -> Tree:
if 'url' in reference:
tree = utils.fetch_tree(
str(reference.get('url')),
str(reference.get('ref')),
reference.get('ref'), # type: ignore
str(reference.get('path', '.')).lstrip('/'))
# Use local files
else:
Expand Down

0 comments on commit 50f9f12

Please sign in to comment.