MCPcopy Index your code
hub / github.com/dask/dask / filetext

Function filetext

dask/utils.py:413–424  ·  view source on GitHub ↗
(text, extension="", open=open, mode="w")

Source from the content-addressed store, hash-verified

411
412@contextmanager
413def filetext(text, extension="", open=open, mode="w"):
414 with tmpfile(extension=extension) as filename:
415 f = open(filename, mode=mode)
416 try:
417 f.write(text)
418 finally:
419 try:
420 f.close()
421 except AttributeError:
422 pass
423
424 yield filename
425
426
427@contextmanager

Callers 15

test_read_csvFunction · 0.90
test_read_csv_indexFunction · 0.90
test_usecolsFunction · 0.90
test_string_blocksizeFunction · 0.90
test_skipinitialspaceFunction · 0.90
test_consistent_dtypesFunction · 0.90
test_empty_csv_fileFunction · 0.90

Calls 2

tmpfileFunction · 0.85
closeMethod · 0.80

Tested by 15

test_read_csvFunction · 0.72
test_read_csv_indexFunction · 0.72
test_usecolsFunction · 0.72
test_string_blocksizeFunction · 0.72
test_skipinitialspaceFunction · 0.72
test_consistent_dtypesFunction · 0.72
test_empty_csv_fileFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…