MCPcopy
hub / github.com/ormar-orm/ormar / index

Method index

ormar/relations/relation_proxy.py:119–126  ·  view source on GitHub ↗

Gets the index of the item in the list :param item: The item to get the index of :type item: "T"

(self, item: T, *args: Any)

Source from the content-addressed store, hash-verified

117 pass
118
119 def index(self, item: T, *args: Any) -> int:
120 """
121 Gets the index of the item in the list
122
123 :param item: The item to get the index of
124 :type item: "T"
125 """
126 return self._relation_cache[item.__hash__()]
127
128 def _get_list_of_missing_weakrefs(self) -> set[int]:
129 """

Callers 4

addMethod · 0.95
_find_existingMethod · 0.80

Calls 1

__hash__Method · 0.45

Tested by

no test coverage detected