MCPcopy
hub / github.com/davidhalter/jedi-vim / tempfile

Function tempfile

pythonx/jedi_vim.py:396–404  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

394
395@contextmanager
396def tempfile(content):
397 # Using this instead of the tempfile module because Windows won't read
398 # from a file not yet written to disk
399 with open(vim_eval('tempname()'), 'w') as f:
400 f.write(content)
401 try:
402 yield f
403 finally:
404 os.unlink(f.name)
405
406
407@_check_jedi_availability(show_error=True)

Callers 1

_goto_specific_nameFunction · 0.85

Calls 1

vim_evalFunction · 0.85

Tested by

no test coverage detected