MCPcopy Create free account
hub / github.com/datapane/datapane / mk_attribs

Function mk_attribs

python-client/src/datapane/common/viewxml_utils.py:77–79  ·  view source on GitHub ↗

convert attributes, dropping None and empty values

(**attribs: t.Any)

Source from the content-addressed store, hash-verified

75
76
77def mk_attribs(**attribs: t.Any) -> SSDict:
78 """convert attributes, dropping None and empty values"""
79 return {str(k): v1 for (k, v) in attribs.items() if (v1 := conv_attrib(v)) is not None}
80
81
82#####################################################################

Callers 3

get_rootMethod · 0.90
_add_attributesMethod · 0.90
__init__Method · 0.90

Calls 2

conv_attribFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected