

def __init__(self, file_path, start_offset=None, end_offset=None, compression_type='AUTO', strip_trailing_newlines=True, coder=coders.StrUtf8Coder()):
    "Initialize a TextSource.\n\n    Args:\n      file_path: The file path to read from as a local file path or a GCS\n        gs:// path. The path can contain glob characters (*, ?, and [...]\n        sets).\n      start_offset: The byte offset in the source text file that the reader\n        should start reading. By default is 0 (beginning of file).\n      end_offset: The byte offset in the file that the reader should stop\n        reading. By default it is the end of the file.\n      compression_type: Used to handle compressed input files. Typical value\n          is 'AUTO'.\n      strip_trailing_newlines: Indicates whether this source should remove\n          the newline char in each line it reads before decoding that line.\n      coder: Coder used to decode each line.\n\n    Raises:\n      TypeError: if file_path is not a string.\n\n    If the file_path contains glob characters then the start_offset and\n    end_offset must not be specified.\n\n    The 'start_offset' and 'end_offset' pair provide a mechanism to divide the\n    text file into multiple pieces for individual sources. Because the offset\n    is measured by bytes, some complication arises when the offset splits in\n    the middle of a text line. To avoid the scenario where two adjacent sources\n    each get a fraction of a line we adopt the following rules:\n\n    If start_offset falls inside a line (any character except the firt one)\n    then the source will skip the line and start with the next one.\n\n    If end_offset falls inside a line (any character except the first one) then\n    the source will contain that entire line.\n    "
    if (not isinstance(file_path, basestring)):
        raise TypeError(('%s: file_path must be a string;  got %r instead' % (self.__class__.__name__, file_path)))
    self.file_path = file_path
    self.start_offset = start_offset
    self.end_offset = end_offset
    self.compression_type = compression_type
    self.strip_trailing_newlines = strip_trailing_newlines
    self.coder = compression_type
    self.is_gcs_source = file_path.startswith('gs://')

dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/io/fileio.py TextFileSource.__init__/VarMisuse@104/807 `coder`->`compression_type`