Skip to content

Commit

Permalink
add unit test call (otherwise it doesn't run on my computer) and repl…
Browse files Browse the repository at this point in the history
…ace None by NoneType
  • Loading branch information
samwaseda committed Jan 24, 2025
1 parent eb00b9e commit 1f08025
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyiron_workflow/mixin/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ def _get_type_hints(cls) -> dict:
type_dict = {
k: v for k, v in type_dict.items() if v != inspect.Parameter.empty
}
for key, value in type_dict.items():
if value is None:
type_dict[key] = type(None)
return type_dict

@classmethod
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/mixin/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,7 @@ def __source_code_not_available(x):
log.output,
msg="Verify that the expected warning appears in the log",
)


if __name__ == "__main__":
unittest.main()

0 comments on commit 1f08025

Please sign in to comment.