MCPcopy Index your code
hub / github.com/bpython/bpython / locate

Method locate

bpython/autocomplete.py:602–608  ·  view source on GitHub ↗
(self, cursor_offset: int, line: str)

Source from the content-addressed store, hash-verified

600 return matches if matches else None
601
602 def locate(self, cursor_offset: int, line: str) -> LinePart | None:
603 r = lineparts.current_word(cursor_offset, line)
604 if r and r.word[-1] == "(":
605 # if the word ends with a (, it's the parent word with an empty
606 # param. Return an empty word
607 return lineparts.LinePart(r.stop, r.stop, "")
608 return r
609
610
611class ExpressionAttributeCompletion(AttrCompletion):

Callers 1

matchesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected