MCPcopy Create free account
hub / github.com/bpython/bpython / format

Method format

bpython/autocomplete.py:373–377  ·  view source on GitHub ↗
(self, filename: str)

Source from the content-addressed store, hash-verified

371 return lineparts.current_string(cursor_offset, line)
372
373 def format(self, filename: str) -> str:
374 if os.sep in filename[:-1]:
375 return filename[filename.rindex(os.sep, 0, -1) + 1 :]
376 else:
377 return filename
378
379
380class AttrCompletion(BaseCompletionType):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected