-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the issue
A clear and concise description of what the bug is.
Here says when attr_omit_null is set,
it is Able to omit showing of attributes if it is null, using attr_omit_null.
Nan value is printed despite of the value of attr_omit_null
Environment
Describe your environment.
- Platform: [Ubuntu]
- Python version: 3.10.12
bigtreeversion:0.16.2
To Reproduce
from bigtree import dict_to_tree
from bigtree import Node, print_tree
path_dict4 = {
"root/moduleA": {},
"root/moduleA/Package": {},
"root/moduleA/Package/AAA": {
"url" : "http://google.com"
},
"root/moduleB": {},
"root/moduleB/Package": {
"url" : "www.bing.com"
},
}
root = dict_to_tree(path_dict4)
root.show(attr_list=["url"], attr_omit_null=False)
root.show(attr_list=["url"], attr_omit_null=True)
print_tree(root, attr_list=["url"], attr_omit_null=True)
Expected behaviour
A clear and concise description of what you expected to happen.
The actual output always contains url=nan.
Should this be omitted when "attr_omit_null" is set?
root
├── moduleA [url=nan]
│ └── Package [url=nan]
│ └── AAA [url=http://google.com]
└── moduleB [url=nan]
└── Package [url=www.bing.com]
root
├── moduleA [url=nan]
│ └── Package [url=nan]
│ └── AAA [url=http://google.com]
└── moduleB [url=nan]
└── Package [url=www.bing.com]
root
├── moduleA [url=nan]
│ └── Package [url=nan]
│ └── AAA [url=http://google.com]
└── moduleB [url=nan]
└── Package [url=www.bing.com]
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working