MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / get_items

Method get_items

thirdparty/clientform/clientform.py:1821–1851  ·  view source on GitHub ↗

Return matching items by name or label. For argument docs, see the docstring for .get()

(self, name=None, label=None, id=None,
                  exclude_disabled=False)

Source from the content-addressed store, hash-verified

1819 return False
1820
1821 def get_items(self, name=None, label=None, id=None,
1822 exclude_disabled=False):
1823 """Return matching items by name or label.
1824
1825 For argument docs, see the docstring for .get()
1826
1827 """
1828 if name is not None and not isstringlike(name):
1829 raise TypeError("item name must be string-like")
1830 if label is not None and not isstringlike(label):
1831 raise TypeError("item label must be string-like")
1832 if id is not None and not isstringlike(id):
1833 raise TypeError("item id must be string-like")
1834 items = [] # order is important
1835 compat = self._form.backwards_compat
1836 for o in self.items:
1837 if exclude_disabled and o.disabled:
1838 continue
1839 if name is not None and o.name != name:
1840 continue
1841 if label is not None:
1842 for l in o.get_labels():
1843 if ((compat and l.text == label) or
1844 (not compat and l.text.find(label) > -1)):
1845 break
1846 else:
1847 continue
1848 if id is not None and o.id != id:
1849 continue
1850 items.append(o)
1851 return items
1852
1853 def get(self, name=None, label=None, id=None, nr=None,
1854 exclude_disabled=False):

Callers 3

getMethod · 0.95
_get_itemsMethod · 0.95
set_value_by_labelMethod · 0.95

Calls 4

isstringlikeFunction · 0.85
findMethod · 0.80
get_labelsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected