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

Function disambiguate

thirdparty/clientform/clientform.py:1689–1702  ·  view source on GitHub ↗
(items, nr, **kwds)

Source from the content-addressed store, hash-verified

1687 )
1688
1689def disambiguate(items, nr, **kwds):
1690 msgs = []
1691 for key, value in kwds.items():
1692 msgs.append("%s=%r" % (key, value))
1693 msg = " ".join(msgs)
1694 if not items:
1695 raise ItemNotFoundError(msg)
1696 if nr is None:
1697 if len(items) > 1:
1698 raise AmbiguityError(msg)
1699 nr = 0
1700 if len(items) <= nr:
1701 raise ItemNotFoundError(msg)
1702 return items[nr]
1703
1704class ListControl(Control):
1705 """Control representing a sequence of items.

Callers 1

getMethod · 0.85

Calls 4

ItemNotFoundErrorClass · 0.85
AmbiguityErrorClass · 0.85
itemsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…