MCPcopy Create free account
hub / github.com/catboost/catboost / open_source_from_loader

Function open_source_from_loader

contrib/tools/cython/Cython/Utils.py:422–430  ·  view source on GitHub ↗
(loader,
                            source_filename,
                            encoding=None, error_handling=None)

Source from the content-addressed store, hash-verified

420
421
422def open_source_from_loader(loader,
423 source_filename,
424 encoding=None, error_handling=None):
425 nrmpath = os.path.normpath(source_filename)
426 arcname = nrmpath[len(loader.archive)+1:]
427 data = loader.get_data(arcname)
428 return io.TextIOWrapper(io.BytesIO(data),
429 encoding=encoding,
430 errors=error_handling)
431
432
433def str_to_number(value):

Callers 1

open_source_fileFunction · 0.85

Calls 2

lenFunction · 0.85
get_dataMethod · 0.80

Tested by

no test coverage detected