MCPcopy Create free account
hub / github.com/rawpython/remi / new_from_list

Method new_from_list

remi/gui.py:2756–2766  ·  view source on GitHub ↗
(cls, items, **kwargs)

Source from the content-addressed store, hash-verified

2754
2755 @classmethod
2756 def new_from_list(cls, items, **kwargs):
2757 item = None
2758 obj = cls(**kwargs)
2759 for item in items:
2760 obj.append(DropDownItem(item))
2761 if item is not None:
2762 try:
2763 obj.select_by_value(item) # ensure one is selected
2764 except UnboundLocalError:
2765 pass
2766 return obj
2767
2768 def append(self, value, key=''):
2769 if isinstance(value, type('')) or isinstance(value, type(u'')):

Callers

nothing calls this directly

Calls 3

DropDownItemClass · 0.85
appendMethod · 0.45
select_by_valueMethod · 0.45

Tested by

no test coverage detected