Skip to content

Commit

Permalink
debug parser's skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
HanxSmile committed Apr 21, 2023
1 parent 091f695 commit 8f69d6b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dsdl/parser/parse_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _parse_class_name(raw_name: str) -> str:
return raw_name

def _parse_skeleton(self, skeleton: _List) -> Optional[_List[_List[int]]]:
if not skeleton:
if skeleton is None:
return None
else:
if isinstance(skeleton, list):
Expand Down
2 changes: 1 addition & 1 deletion dsdl/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def _generate(self) -> Optional[str]:
for ele_class in val.field_list:
dsdl_py += f""""{ele_class.label_value}","""
dsdl_py += "],\n"
if val.skeleton:
if val.skeleton is not None:
dsdl_py += f""" skeleton = {val.skeleton}\n"""
dsdl_py += ")\n"
if idx != len(ordered_keys) - 1:
Expand Down
1 change: 0 additions & 1 deletion dsdl/tools/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def view(dsdl_yaml, num, random, visualize, fields, config, position, multistage
else:
dsdl_py = dsdl_parse(dsdl_yaml["yaml_file"], dsdl_library_path="")
exec(dsdl_py, {})

dataset = Dataset(dsdl_yaml["samples"], dsdl_yaml["sample_type"], config,
global_info=dsdl_yaml["global_info"], global_info_type=dsdl_yaml["global_info_type"])

Expand Down

0 comments on commit 8f69d6b

Please sign in to comment.