MCPcopy Index your code
hub / github.com/numpy/numpy / skip_brackets

Function skip_brackets

numpy/_core/code_generators/genapi.py:181–190  ·  view source on GitHub ↗
(s, lbrac, rbrac)

Source from the content-addressed store, hash-verified

179 return f'{self.filename}:{self.lineno}:{self.msg}'
180
181def skip_brackets(s, lbrac, rbrac):
182 count = 0
183 for i, c in enumerate(s):
184 if c == lbrac:
185 count += 1
186 elif c == rbrac:
187 count -= 1
188 if count == 0:
189 return i
190 raise ValueError(f"no match '{lbrac}' for '{rbrac}' ({s!r})")
191
192def split_arguments(argstr):
193 arguments = []

Callers 1

split_argumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…