def __init__(self, content, path=None, sha=None, file_type=None, marker=((), ()), parser=None):
self.content = content<EOL>self.file_type = file_type<EOL>self.path = path<EOL>self.sha = sha<EOL>self.marker = marker<EOL>self.dependencies = []<EOL>self.resolved_files = []<EOL>self.is_valid = False<EOL>self.file_marker, self.line_marker = marker<EOL>if parser:<EOL><INDENT>self.parser = parser<EOL><DEDENT>else:<EOL><INDENT>from . import parser as parser_class<EOL>if file_type is not None:<EOL><INDENT>if file_type == filetypes.requirements_txt:<EOL><INDENT>self.parser = parser_class.RequirementsTXTParser<EOL><DEDENT>elif file_type == filetypes.tox_ini:<EOL><INDENT>self.parser = parser_class.ToxINIParser<EOL><DEDENT>elif file_type == filetypes.conda_yml:<EOL><INDENT>self.parser = parser_class.CondaYMLParser<EOL><DEDENT>elif file_type == filetypes.pipfile:<EOL><INDENT>self.parser = parser_class.PipfileParser<EOL><DEDENT>elif file_type == filetypes.pipfile_lock:<EOL><INDENT>self.parser = parser_class.PipfileLockParser<EOL><DEDENT>elif file_type == filetypes.setup_cfg:<EOL><INDENT>self.parser = parser_class.SetupCfgParser<EOL><DEDENT><DEDENT>elif path is not None:<EOL><INDENT>if path.endswith("<STR_LIT>"):<EOL><INDENT>self.parser = parser_class.RequirementsTXTParser<EOL><DEDENT>elif path.endswith("<STR_LIT>"):<EOL><INDENT>self.parser = parser_class.CondaYMLParser<EOL><DEDENT>elif path.endswith("<STR_LIT>"):<EOL><INDENT>self.parser = parser_class.ToxINIParser<EOL><DEDENT>elif path.endswith("<STR_LIT>"):<EOL><INDENT>self.parser = parser_class.PipfileParser<EOL><DEDENT>elif path.endswith("<STR_LIT>"):<EOL><INDENT>self.parser = parser_class.PipfileLockParser<EOL><DEDENT>elif path.endswith("<STR_LIT>"):<EOL><INDENT>self.parser = parser_class.SetupCfgParser<EOL><DEDENT><DEDENT><DEDENT>if not hasattr(self, "<STR_LIT>"):<EOL><INDENT>raise errors.UnknownDependencyFileError<EOL><DEDENT>self.parser = self.parser(self)<EOL>
:param content:
:param path:
:param sha:
:param marker:
:param file_type:
:param parser: