Skip to content

Commit

Permalink
use a python backward compatible check in isinstance method
Browse files Browse the repository at this point in the history
  • Loading branch information
RafayAK committed Oct 14, 2023
1 parent 1fed7e5 commit 117e2e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/rich_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def print_config_tree(
branch = tree.add(field, style=style, guide_style=style)

config_group = cfg[field]
if isinstance(config_group, DictConfig | ListConfig):
if isinstance(config_group, (DictConfig, ListConfig)):
branch_content = OmegaConf.to_yaml(config_group, resolve=resolve)
else:
branch_content = str(config_group)
Expand Down

0 comments on commit 117e2e6

Please sign in to comment.