MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _is_contiguous

Function _is_contiguous

lib/sqlalchemy/engine/_util_cy.py:117–126  ·  view source on GitHub ↗
(indexes: Tuple[int, ...])

Source from the content-addressed store, hash-verified

115
116@cython.cfunc
117def _is_contiguous(indexes: Tuple[int, ...]) -> cython.bint:
118 i: cython.Py_ssize_t
119 prev: cython.Py_ssize_t
120 curr: cython.Py_ssize_t
121 for i in range(1, len(indexes)):
122 prev = indexes[i - 1]
123 curr = indexes[i]
124 if prev != curr - 1:
125 return False
126 return True
127
128
129def tuplegetter(*indexes: int) -> _TupleGetterType:

Callers 1

tuplegetterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected