MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / unicode_text

Function unicode_text

src/textcode/analysis.py:342–348  ·  view source on GitHub ↗

Return a string guaranteed to be unicode from the content of the file at location. The whole file content is returned at once, which may be a problem for very large files.

(location, decrlf=False)

Source from the content-addressed store, hash-verified

340
341
342def unicode_text(location, decrlf=False):
343 """
344 Return a string guaranteed to be unicode from the content of the file at
345 location. The whole file content is returned at once, which may be a
346 problem for very large files.
347 """
348 return u' '.join(unicode_text_lines(location, decrlf=decrlf))
349
350
351def is_source(location):

Callers 3

is_datafileMethod · 0.90
parse_copyright_fileFunction · 0.90
detect_licenseMethod · 0.90

Calls 2

unicode_text_linesFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected