Skip to content

Commit

Permalink
fixed configen test
Browse files Browse the repository at this point in the history
  • Loading branch information
omry committed Dec 13, 2020
1 parent 4d4bd6e commit fa0c7aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hydra/_internal/hydra.py
Expand Up @@ -562,7 +562,7 @@ def _print_defaults_tree_impl(
indent: int = 0,
) -> None:
assert log is not None
from ..core.new_default_element import GroupDefault, InputDefault, VirtualRoot
from ..core.default_element import GroupDefault, InputDefault, VirtualRoot

def to_str(node: InputDefault) -> str:
if isinstance(node, VirtualRoot):
Expand Down
6 changes: 3 additions & 3 deletions tools/configen/configen/utils.py
Expand Up @@ -39,15 +39,15 @@ def type_str(t: Any) -> str:
if hasattr(t, "__name__"):
name = str(t.__name__)
else:
if t.name is None:
if t._name is None:
if t.__origin__ is not None:
name = type_str(t.__origin__)
else:
name = str(t.name)
name = str(t._name)

args = getattr(t, "__args__", None)
if args is not None:
args = ", ".join([type_str(t) for t in (list(t.__args__))])
args = ", ".join([type_str(t) for t in t.__args__])
ret = f"{name}[{args}]"
else:
ret = name
Expand Down

0 comments on commit fa0c7aa

Please sign in to comment.