diff --git a/dvc/istextfile.py b/dvc/istextfile.py index a11a9ce1d..7d66da5bd 100644 --- a/dvc/istextfile.py +++ b/dvc/istextfile.py @@ -7,15 +7,7 @@ from dvc.utils.compat import open # perls-guess-if-file-is-text-or-binary-implemented-in-python -# A function that takes an integer in the 8-bit range and returns -# a single-character byte object in py3 / a single-character string -# in py2. -# -def _int2byte(i): - return bytes((i,)) - - -TEXT_CHARS = b"".join(_int2byte(i) for i in range(32, 127)) + b"\n\r\t\f\b" +TEXT_CHARS = bytes(range(32, 127)) + b"\n\r\t\f\b" def istextfile(fname, blocksize=512):